diff options
Diffstat (limited to 'sdlmame/0002-glibc-musl-fixes.patch')
-rw-r--r-- | sdlmame/0002-glibc-musl-fixes.patch | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/sdlmame/0002-glibc-musl-fixes.patch b/sdlmame/0002-glibc-musl-fixes.patch new file mode 100644 index 0000000..03ffde3 --- /dev/null +++ b/sdlmame/0002-glibc-musl-fixes.patch @@ -0,0 +1,52 @@ +--- a/3rdparty/asio/include/asio/detail/config.hpp ++++ b/3rdparty/asio/include/asio/detail/config.hpp +@@ -877,9 +877,7 @@ + # endif // !defined(ASIO_HAS_EVENTFD)
+ # if !defined(ASIO_HAS_TIMERFD)
+ # if defined(ASIO_HAS_EPOLL)
+-# if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 8)
+ # define ASIO_HAS_TIMERFD 1
+-# endif // (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 8)
+ # endif // defined(ASIO_HAS_EPOLL)
+ # endif // !defined(ASIO_HAS_TIMERFD)
+ #endif // defined(__linux__)
+--- a/3rdparty/asio/include/asio/detail/impl/eventfd_select_interrupter.ipp ++++ b/3rdparty/asio/include/asio/detail/impl/eventfd_select_interrupter.ipp +@@ -23,11 +23,7 @@ + #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <fcntl.h>
+-#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
+-# include <asm/unistd.h>
+-#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
+-# include <sys/eventfd.h>
+-#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
++#include <sys/eventfd.h>
+ #include "asio/detail/cstdint.hpp"
+ #include "asio/detail/eventfd_select_interrupter.hpp"
+ #include "asio/detail/throw_error.hpp"
+@@ -45,15 +41,7 @@ +
+ void eventfd_select_interrupter::open_descriptors()
+ {
+-#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
+- 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
+-# if defined(EFD_CLOEXEC) && defined(EFD_NONBLOCK)
++#if defined(EFD_CLOEXEC) && defined(EFD_NONBLOCK)
+ write_descriptor_ = read_descriptor_ =
+ ::eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK);
+ # else // defined(EFD_CLOEXEC) && defined(EFD_NONBLOCK)
+@@ -69,7 +57,6 @@ + ::fcntl(read_descriptor_, F_SETFD, FD_CLOEXEC);
+ }
+ }
+-#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
+
+ if (read_descriptor_ == -1)
+ {
|