From 397421408d80e13ebd7d72000bd2be4a2c0cd6d2 Mon Sep 17 00:00:00 2001 From: Ryan P.C. McQuen Date: Mon, 25 Jul 2016 06:44:32 -0700 Subject: development/flow: Fix building on 32-bit. Thanks to David Spencer. Signed-off-by: Ryan P.C. McQuen --- development/flow/flow-noarch.patch | 27 +++++++++++++++++++++++++++ development/flow/flow.SlackBuild | 5 ++++- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 development/flow/flow-noarch.patch diff --git a/development/flow/flow-noarch.patch b/development/flow/flow-noarch.patch new file mode 100644 index 0000000000..2925164b1d --- /dev/null +++ b/development/flow/flow-noarch.patch @@ -0,0 +1,27 @@ +diff -u -r flow-0.29.0/hack/heap/hh_shared.c flow-0.29.0-patched/hack/heap/hh_shared.c +--- flow-0.29.0/hack/heap/hh_shared.c 2016-07-14 18:29:48.000000000 +0100 ++++ flow-0.29.0-patched/hack/heap/hh_shared.c 2016-07-23 17:55:27.041786018 +0100 +@@ -130,19 +130,14 @@ + * appeared in Linux 3.17. + ****************************************************************************/ + #if !defined __APPLE__ && !defined _WIN32 ++ + // Linux version for the architecture must support syscall memfd_create +- #if defined(__x86_64__) +- #define SYS_memfd_create 319 +- #elif defined(__powerpc64__) +- #define SYS_memfd_create 360 +- #elif defined(__aarch64__) +- #define SYS_memfd_create 385 +- #else +- #error "hh_shared.c requires a architecture that supports memfd_create" ++ #include ++ #if !defined(SYS_memfd_create) ++ #error "hh_shared.c requires an architecture that supports memfd_create" + #endif + + #define MEMFD_CREATE 1 +- #include + + /* Originally this function would call uname(), parse the linux + * kernel release version and make a decision based on whether diff --git a/development/flow/flow.SlackBuild b/development/flow/flow.SlackBuild index c1a17894e8..b81135d7fe 100644 --- a/development/flow/flow.SlackBuild +++ b/development/flow/flow.SlackBuild @@ -24,7 +24,7 @@ PRGNAM=flow VERSION=${VERSION:-0.29.0} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -73,6 +73,9 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +## Fix building on 32-bit. +patch -p1 < $CWD/$PRGNAM-noarch.patch + CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ make -- cgit v1.2.3