summaryrefslogtreecommitdiffstats
path: root/package/boost/0002-fix-uclibc-eventfd.patch
diff options
context:
space:
mode:
authorJörg Krause <joerg.krause@embedded.rocks>2015-12-11 14:57:57 +0100
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2015-12-12 13:53:09 +0100
commit12ec0cd9af0a9754d97fafddef3c281e95ebe59a (patch)
tree75914a3e8b727e6b9f5125b398d90ce06a70166d /package/boost/0002-fix-uclibc-eventfd.patch
parentd3e3dd67e79160504f4d220c05bcfc460873c9af (diff)
downloadbuildroot-12ec0cd9af0a9754d97fafddef3c281e95ebe59a.tar.gz
buildroot-12ec0cd9af0a9754d97fafddef3c281e95ebe59a.zip
package/boost: bump to version 1.59.0
Also: * remove patch "gcc.jam compiler options fix" - merged upstream * renumber patch "fix uclibc eventfd". Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks> Reviewed-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com> Tested-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/boost/0002-fix-uclibc-eventfd.patch')
-rw-r--r--package/boost/0002-fix-uclibc-eventfd.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/package/boost/0002-fix-uclibc-eventfd.patch b/package/boost/0002-fix-uclibc-eventfd.patch
new file mode 100644
index 0000000000..1b7eb8723c
--- /dev/null
+++ b/package/boost/0002-fix-uclibc-eventfd.patch
@@ -0,0 +1,38 @@
+Use eventfd() function with uClibc
+
+The Boost eventfd code either directly makes the eventfd system call
+using __NR_eventfd (when __GLIBC_MINOR is less than 8), or otherwise
+uses the eventfd() function provided by the C library.
+
+However, since uClibc pretends to be glibc 2.2, the Boost eventfd code
+directly uses the system call. While it works fine on most
+architectures, it doesn't on ARC since __NR_eventfd is not defined on
+this architecture. However, eventfd() is properly implemented.
+
+So, this patch adjusts the logic used by Boost to consider uClibc as a
+C library providing the eventfd() function.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: b/boost/asio/detail/impl/eventfd_select_interrupter.ipp
+===================================================================
+--- a/boost/asio/detail/impl/eventfd_select_interrupter.ipp
++++ b/boost/asio/detail/impl/eventfd_select_interrupter.ipp
+@@ -23,7 +23,7 @@
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <fcntl.h>
+-#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
++#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8 && !defined(__UCLIBC__)
+ # include <asm/unistd.h>
+ #else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
+ # include <sys/eventfd.h>
+@@ -46,7 +46,7 @@
+
+ void eventfd_select_interrupter::open_descriptors()
+ {
+-#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
++#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8 && !defined(__UCLIBC__)
+ write_descriptor_ = read_descriptor_ = syscall(__NR_eventfd, 0);
+ if (read_descriptor_ != -1)
+ {
OpenPOWER on IntegriCloud