• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/boost/0002-fix-uclibc-eventfd.patch
Jörg KrauseJörg Krause committed 12ec0cd9af011 Dec 2015
Raw file
Source viewDiff to previous
 
1
Use eventfd() function with uClibc
2
​
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.
6
​
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.
11
​
12
So, this patch adjusts the logic used by Boost to consider uClibc as a
13
C library providing the eventfd() function.
14
​
15
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
16
​
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 @@
31
 
32
 void eventfd_select_interrupter::open_descriptors()
33
 {
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)
38
   {
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.