From bb1882d2940f903059b8ed94b0b9e2494031748f Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Wed, 1 May 2019 13:58:07 -0700 Subject: [PATCH] boost: Fix compilation with uClibc-ng Signed-off-by: Rosen Penev (cherry-picked from 053faa31e53122eb7efdc78f954e9563ed06116e) --- libs/boost/Makefile | 2 +- libs/boost/patches/010-uclibc-ng.patch | 43 ++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 libs/boost/patches/010-uclibc-ng.patch diff --git a/libs/boost/Makefile b/libs/boost/Makefile index e71e4331db..3c5ce7e560 100644 --- a/libs/boost/Makefile +++ b/libs/boost/Makefile @@ -13,7 +13,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=boost PKG_VERSION:=1.68.0 PKG_SOURCE_VERSION:=1_68_0 -PKG_RELEASE:=5 +PKG_RELEASE:=6 PKG_SOURCE:=$(PKG_NAME)_$(PKG_SOURCE_VERSION).tar.bz2 PKG_SOURCE_URL:=@SF/$(PKG_NAME)/$(PKG_NAME)/$(PKG_VERSION) https://dl.bintray.com/boostorg/release/$(PKG_VERSION)/source/ diff --git a/libs/boost/patches/010-uclibc-ng.patch b/libs/boost/patches/010-uclibc-ng.patch new file mode 100644 index 0000000000..27d93b2b37 --- /dev/null +++ b/libs/boost/patches/010-uclibc-ng.patch @@ -0,0 +1,43 @@ +--- a/boost/asio/detail/impl/eventfd_select_interrupter.ipp ++++ b/boost/asio/detail/impl/eventfd_select_interrupter.ipp +@@ -23,11 +23,11 @@ + #include + #include + #include +-#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8 ++#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 2 + # include +-#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8 ++#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 2 + # include +-#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8 ++#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 2 + #include + #include + #include +@@ -46,14 +46,14 @@ eventfd_select_interrupter::eventfd_select_interrupter() + + void eventfd_select_interrupter::open_descriptors() + { +-#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8 ++#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 2 + write_descriptor_ = read_descriptor_ = syscall(__NR_eventfd, 0); + if (read_descriptor_ != -1) + { + ::fcntl(read_descriptor_, F_SETFL, O_NONBLOCK); + ::fcntl(read_descriptor_, F_SETFD, FD_CLOEXEC); + } +-#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8 ++#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 2 + # if defined(EFD_CLOEXEC) && defined(EFD_NONBLOCK) + write_descriptor_ = read_descriptor_ = + ::eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK); +@@ -70,7 +70,7 @@ void eventfd_select_interrupter::open_descriptors() + ::fcntl(read_descriptor_, F_SETFD, FD_CLOEXEC); + } + } +-#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8 ++#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 2 + + if (read_descriptor_ == -1) + {