-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(gpkg/glibc): disabling the `epoll_pwait2` system call
- Loading branch information
Showing
15 changed files
with
418 additions
and
660 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- glibc-2.39/sysdeps/unix/sysv/linux/epoll_pwait2.c 2024-01-31 03:34:58.000000000 +0300 | ||
+++ glibc-2.39/sysdeps/unix/sysv/linux/epoll_pwait2.c.patch 2024-04-10 22:25:45.538639010 +0300 | ||
@@ -16,15 +16,26 @@ | ||
License along with the GNU C Library; if not, see | ||
<https://www.gnu.org/licenses/>. */ | ||
|
||
+#include <stddef.h> | ||
+#include <unistd.h> | ||
+#include <sys/types.h> | ||
#include <sys/epoll.h> | ||
-#include <sysdep.h> | ||
+#include <sysdep-cancel.h> | ||
+ | ||
+#define MSEC_PER_SEC 1000L | ||
+#define NSEC_PER_MSEC 1000000L | ||
|
||
int | ||
__epoll_pwait2_time64 (int fd, struct epoll_event *ev, int maxev, | ||
const struct __timespec64 *tmo, const sigset_t *s) | ||
{ | ||
- /* The syscall only supports 64-bit time_t. */ | ||
- return SYSCALL_CANCEL (epoll_pwait2, fd, ev, maxev, tmo, s, __NSIG_BYTES); | ||
+ long timeout = tmo->tv_sec * MSEC_PER_SEC; | ||
+ if (tmo->tv_nsec > 0) { | ||
+ timeout += tmo->tv_nsec / NSEC_PER_MSEC; | ||
+ if (tmo->tv_nsec % NSEC_PER_MSEC > 0) | ||
+ timeout += 1; | ||
+ } | ||
+ return epoll_pwait (fd, ev, maxev, timeout, s); | ||
} | ||
#if __TIMESIZE != 64 | ||
libc_hidden_def (__epoll_pwait2_time64) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!@TERMUX_PREFIX_CLASSICAL@/bin/sh | ||
#!@TERMUX_PREFIX@/bin/sh | ||
|
||
set -e | ||
|
||
|
Oops, something went wrong.