strace: Fix aarch64 build
authorFredrik Fornwall <fredrik@fornwall.net>
Mon, 4 Jan 2016 02:00:15 +0000 (21:00 -0500)
committerFredrik Fornwall <fredrik@fornwall.net>
Mon, 4 Jan 2016 02:00:15 +0000 (21:00 -0500)
packages/strace/build.sh
packages/strace/fcntl.h.patch [new file with mode: 0644]

index 604f852..94c53d0 100755 (executable)
@@ -5,3 +5,9 @@ TERMUX_PKG_SRCURL=http://downloads.sourceforge.net/project/strace/strace/${TERMU
 TERMUX_PKG_RM_AFTER_INSTALL=bin/strace-graph # This is a perl script
 
 CFLAGS+=" -Du64=uint64_t"
+
+if [ $TERMUX_ARCH_BITS = "64" ]; then
+       # The strace configure script only looks for struct flock64 in <linux/fcntl.h>,
+       # but we actually have it in <fcntl.h> here:
+       TERMUX_PKG_EXTRA_CONFIGURE_ARGS="ac_cv_type_struct_flock64=yes"
+fi
diff --git a/packages/strace/fcntl.h.patch b/packages/strace/fcntl.h.patch
new file mode 100644 (file)
index 0000000..f582ee8
--- /dev/null
@@ -0,0 +1,11 @@
+diff -u -r ../strace-4.11/flock.h ./flock.h
+--- ../strace-4.11/flock.h     2015-12-17 12:56:48.000000000 -0500
++++ ./flock.h  2016-01-03 20:51:51.276893007 -0500
+@@ -26,6 +26,7 @@
+  */
+ #include <linux/fcntl.h>
++#include <fcntl.h>
+ #if defined HAVE_STRUCT_FLOCK
+ typedef struct flock struct_kernel_flock;