Debian Codegraph @

src/libc/epoll.c

raw
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2
3 #include <sys/epoll.h>
4
5 #include "libc-shim.h"
6
7 /* On 32-bit architectures built with _TIME_BITS=64, glibc renames epoll_pwait2() to
8 * __epoll_pwait2_time64 via __asm__() in <sys/epoll.h> so the linker picks the variant whose
9 * struct timespec ABI matches our 64-bit time_t. dlsym() can't see that header-level rename, so
10 * we have to spell out the right name here, otherwise we'd silently dispatch a 64-bit timespec to
11 * the legacy 32-bit-time_t entry point. */
12 #ifdef __USE_TIME_BITS64
13 DEFINE_LIBC_ERRNO_SHIM_NAMED(epoll_pwait2, "__epoll_pwait2_time64", int,
14 int, fd,
15 struct epoll_event *, events,
16 int, maxevents,
17 const struct timespec *, timeout,
18 const sigset_t *, sigmask)
19 #else
20 DEFINE_LIBC_ERRNO_SHIM(epoll_pwait2, int,
21 int, fd,
22 struct epoll_event *, events,
23 int, maxevents,
24 const struct timespec *, timeout,
25 const sigset_t *, sigmask)
26 #endif