configs/bananapro: bump Linux to 4.10.4
[buildroot-gz.git] / package / boost / 0002-fix-uclibc-eventfd.patch
blob1b7eb8723ce3f8c6ccd295a113d6e5d61a565ed5
1 Use eventfd() function with uClibc
3 The Boost eventfd code either directly makes the eventfd system call
4 using __NR_eventfd (when __GLIBC_MINOR is less than 8), or otherwise
5 uses the eventfd() function provided by the C library.
7 However, since uClibc pretends to be glibc 2.2, the Boost eventfd code
8 directly uses the system call. While it works fine on most
9 architectures, it doesn't on ARC since __NR_eventfd is not defined on
10 this architecture. However, eventfd() is properly implemented.
12 So, this patch adjusts the logic used by Boost to consider uClibc as a
13 C library providing the eventfd() function.
15 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
17 Index: b/boost/asio/detail/impl/eventfd_select_interrupter.ipp
18 ===================================================================
19 --- a/boost/asio/detail/impl/eventfd_select_interrupter.ipp
20 +++ b/boost/asio/detail/impl/eventfd_select_interrupter.ipp
21 @@ -23,7 +23,7 @@
22 #include <sys/stat.h>
23 #include <sys/types.h>
24 #include <fcntl.h>
25 -#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
26 +#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8 && !defined(__UCLIBC__)
27 # include <asm/unistd.h>
28 #else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
29 # include <sys/eventfd.h>
30 @@ -46,7 +46,7 @@
32 void eventfd_select_interrupter::open_descriptors()
34 -#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
35 +#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8 && !defined(__UCLIBC__)
36 write_descriptor_ = read_descriptor_ = syscall(__NR_eventfd, 0);
37 if (read_descriptor_ != -1)