mailing list of musl libc
 help / color / mirror / code / Atom feed
e6b737081939d8ec36c943a4e613911aa7746ba2 blob 708 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 
#include <poll.h>
#include <time.h>
#include <signal.h>
#include "syscall.h"

int poll(struct pollfd *fds, nfds_t n, int timeout)
{
	time_t s = timeout >= 0 ? timeout / 1000 : 0;
	long ns = timeout >= 0 ? timeout % 1000 * 1000000 : 0;
	int r = -ENOSYS;
#ifdef SYS_ppoll_time64
	int r = __syscall_cp(SYS_ppoll_time64, fds, n,
		timeout >= 0 ? ((long long[]){s, ns}) : 0,
		0, _NSIG / 8);
	if (SYS_ppoll == SYS_ppoll_time64 || r != -ENOSYS)
		return __syscall_ret(r);
#endif
#ifdef SYS_ppoll
	r = __syscall_cp(SYS_ppoll, fds, n,
		timeout >= 0 ? ((long[]){s, ns}) : 0,
		0, _NSIG / 8);
#endif
#ifdef SYS_poll
	if (r == -ENOSYS)
		r = __syscall_cp(SYS_poll, fds, n, timeout);
#endif
	return __syscall_ret(r);
}
debug log:

solving e6b737081939 ...
found e6b737081939 in https://inbox.vuxu.org/musl/20201227184032.22413-12-alobakin@pm.me/
found c84c8a999ccc in https://git.vuxu.org/mirror/musl/
preparing index
index prepared:
100644 c84c8a999ccca53321234bd7642e77ff2e113efe	src/select/poll.c

applying [1/1] https://inbox.vuxu.org/musl/20201227184032.22413-12-alobakin@pm.me/
diff --git a/src/select/poll.c b/src/select/poll.c
index c84c8a999ccc..e6b737081939 100644

Checking patch src/select/poll.c...
Applied patch src/select/poll.c cleanly.

index at:
100644 e6b737081939d8ec36c943a4e613911aa7746ba2	src/select/poll.c

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).