diff options
Diffstat (limited to 'patches/glib-2.44.0/0001-check-if-splice-takes-6-arguments.patch')
-rw-r--r-- | patches/glib-2.44.0/0001-check-if-splice-takes-6-arguments.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/patches/glib-2.44.0/0001-check-if-splice-takes-6-arguments.patch b/patches/glib-2.44.0/0001-check-if-splice-takes-6-arguments.patch new file mode 100644 index 000000000..01668cd13 --- /dev/null +++ b/patches/glib-2.44.0/0001-check-if-splice-takes-6-arguments.patch @@ -0,0 +1,42 @@ +From: George McCollister <george.mccollister@gmail.com> +Date: Thu, 2 Dec 2010 09:31:38 -0600 +Subject: [PATCH] check if splice() takes 6 arguments + +checking for the presence of splice() isn't sufficient. Older +implimentations only accept 4 arguments while this version of glib +assumes that it takes 6. + +Signed-off-by: George McCollister <george.mccollister@gmail.com> +[mol: configure.in -> configure.ac] +Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> +--- + configure.ac | 16 +++++++++++++++- + 1 file changed, 15 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index a01e58d..5a42487 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -959,7 +959,21 @@ AC_CHECK_FUNCS(lstat strsignal vsnprintf stpcpy strcasecmp strncasecmp poll vasp + AC_CHECK_FUNCS(lchmod lchown fchmod fchown utimes getresuid) + AC_CHECK_FUNCS(getmntent_r setmntent endmntent hasmntopt getfsstat getvfsstat fallocate) + case $host_os in aix*) ac_cv_func_splice=no ;; esac # AIX splice() is something else +-AC_CHECK_FUNCS(splice) ++AC_CACHE_CHECK([for splice()], ++ [ac_cv_func_splice], ++ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[ ++#define _GNU_SOURCE ++#include <stdlib.h> ++#include <fcntl.h> ++ ]],[[ ++ splice(0, NULL, 0, NULL, (size_t)0, (unsigned int)0); ++ ]])], ++ [ac_cv_func_splice=yes], ++ [ac_cv_func_splice=no])]) ++ ++AS_IF([test "x$ac_cv_func_splice" = "xyes"],[ ++ AC_DEFINE([HAVE_SPLICE],[1],[If we have splice]) ++]) + AC_CHECK_FUNCS(prlimit) + + # To avoid finding a compatibility unusable statfs, which typically |