Browse Source

Merge pull request #8869 from neheb/boo

boost: Fix compilation with uClibc-ng
lilik-openwrt-22.03
Rosen Penev 6 years ago
committed by GitHub
parent
commit
420396fba7
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 44 additions and 1 deletions
  1. +1
    -1
      libs/boost/Makefile
  2. +43
    -0
      libs/boost/patches/010-uclibc-ng.patch

+ 1
- 1
libs/boost/Makefile View File

@ -13,7 +13,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=boost PKG_NAME:=boost
PKG_VERSION:=1.70.0 PKG_VERSION:=1.70.0
PKG_SOURCE_VERSION:=1_70_0 PKG_SOURCE_VERSION:=1_70_0
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)_$(PKG_SOURCE_VERSION).tar.bz2 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/ PKG_SOURCE_URL:=@SF/$(PKG_NAME)/$(PKG_NAME)/$(PKG_VERSION) https://dl.bintray.com/boostorg/release/$(PKG_VERSION)/source/


+ 43
- 0
libs/boost/patches/010-uclibc-ng.patch View File

@ -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 <sys/stat.h>
#include <sys/types.h>
#include <fcntl.h>
-#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
+#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
# include <asm/unistd.h>
-#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
+#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
# include <sys/eventfd.h>
-#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
+#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
#include <boost/asio/detail/cstdint.hpp>
#include <boost/asio/detail/eventfd_select_interrupter.hpp>
#include <boost/asio/detail/throw_error.hpp>
@@ -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)
{

Loading…
Cancel
Save