fish: Fix compiling with master
authorFredrik Fornwall <fredrik@fornwall.net>
Thu, 17 Dec 2015 10:15:33 +0000 (05:15 -0500)
committerFredrik Fornwall <fredrik@fornwall.net>
Thu, 17 Dec 2015 10:15:33 +0000 (05:15 -0500)
packages/fish/common.cpp.patch [new file with mode: 0644]
packages/fish/src-fallback.h.patch [new file with mode: 0644]

diff --git a/packages/fish/common.cpp.patch b/packages/fish/common.cpp.patch
new file mode 100644 (file)
index 0000000..f474aa1
--- /dev/null
@@ -0,0 +1,16 @@
+diff -u -r ../fish-shell-master/src/common.cpp ./src/common.cpp
+--- ../fish-shell-master/src/common.cpp        2015-12-16 10:35:17.000000000 -0500
++++ ./src/common.cpp   2015-12-17 05:09:51.542032656 -0500
+@@ -90,8 +90,12 @@
+     int trace_size = 0;
+     trace_size = backtrace(trace, 32);
++#ifdef __ANDROID__
++    debug(0, L"Backtrace: Not available on Android");
++#else
+     debug(0, L"Backtrace:");
+     backtrace_symbols_fd(trace, trace_size, STDERR_FILENO);
++#endif
+ }
+ int fgetws2(wcstring *s, FILE *f)
diff --git a/packages/fish/src-fallback.h.patch b/packages/fish/src-fallback.h.patch
new file mode 100644 (file)
index 0000000..8c22c39
--- /dev/null
@@ -0,0 +1,12 @@
+diff -u -r ../fish-shell-master/src/fallback.h ./src/fallback.h
+--- ../fish-shell-master/src/fallback.h        2015-12-16 10:35:17.000000000 -0500
++++ ./src/fallback.h   2015-12-17 05:05:46.153316539 -0500
+@@ -31,7 +31,7 @@
+ #if __STDC_VERSION__ < 199901L
+ # if __GNUC__ >= 2
+ #  define __func__ __FUNCTION__
+-# else
++# elif !defined(__func__)
+ #  define __func__ "<unknown>"
+ # endif
+ #endif