summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2015-07-21 09:12:40 -0700
committerThiago Macieira <thiago.macieira@intel.com>2015-07-28 20:16:08 +0000
commit5cc734e0a3e941f866af6e234fe1e36939044110 (patch)
tree20ab1da5efd05366fa18d5d3f0a5613976a8c0ab
parentce87d82d4ab141d40ec6fbe357e310f636fa0443 (diff)
forkfd: Fix build with uClibc <= 0.9.33
That version of uClibc has neither pipe2 nor eventfd. There were two problems with our detection. First, it checked for glibc incorrectly, so the comparison was always true as __GLIBC__ << 16 = 0x20000 Second, we needed to check for uClibc's version. Task-number: QTBUG-47337 Change-Id: Ib306f8f647014b399b87ffff13f3023b7f8d6d4a Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
-rw-r--r--src/3rdparty/forkfd/forkfd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/3rdparty/forkfd/forkfd.c b/src/3rdparty/forkfd/forkfd.c
index 86e109358c..a95d486d9f 100644
--- a/src/3rdparty/forkfd/forkfd.c
+++ b/src/3rdparty/forkfd/forkfd.c
@@ -44,11 +44,13 @@
#include <unistd.h>
#ifdef __linux__
-# if (defined(__GLIBC__) && (__GLIBC__ << 16) + __GLIBC_MINOR__ >= 0x207) || defined(__BIONIC__)
+# if defined(__BIONIC__) || (defined(__GLIBC__) && (__GLIBC__ << 8) + __GLIBC_MINOR__ >= 0x207 && \
+ (!defined(__UCLIBC__) || ((__UCLIBC_MAJOR__ << 16) + (__UCLIBC_MINOR__ << 8) + __UCLIBC_SUBLEVEL__ > 0x921)))
# include <sys/eventfd.h>
# define HAVE_EVENTFD 1
# endif
-# if (defined(__GLIBC__) && (__GLIBC__ << 16) + __GLIBC_MINOR__ >= 0x209) || defined(__BIONIC__)
+# if defined(__BIONIC__) || (defined(__GLIBC__) && (__GLIBC__ << 8) + __GLIBC_MINOR__ >= 0x209 && \
+ (!defined(__UCLIBC__) || ((__UCLIBC_MAJOR__ << 16) + (__UCLIBC_MINOR__ << 8) + __UCLIBC_SUBLEVEL__ > 0x921)))
# define HAVE_PIPE2 1
# endif
#endif