blob: e5d0d8aa0657bdb18c606d7726b3591f6873427a [file] [log] [blame]
Elliott Hughes13da6002025-02-03 10:42:13 -08001// Copyright (C) 2017 The Android Open Source Project
2// SPDX-License-Identifier: BSD-2-Clause
Elliott Hughes21b56eb2017-10-20 17:57:17 -07003
4#include <poll.h>
5
6#include "header_checks.h"
7
8static void poll_h() {
9 TYPE(struct pollfd);
10 STRUCT_MEMBER(struct pollfd, int, fd);
11 STRUCT_MEMBER(struct pollfd, short, events);
12 STRUCT_MEMBER(struct pollfd, short, revents);
13
Elliott Hughesf4d57ac2025-01-28 14:22:12 -080014#if !defined(__GLIBC__) // Our glibc is too old.
15 TYPE(sigset_t);
16 TYPE(struct timespec);
17#endif
18
Elliott Hughes21b56eb2017-10-20 17:57:17 -070019 TYPE(nfds_t);
20
21 MACRO(POLLIN);
22 MACRO(POLLRDNORM);
23 MACRO(POLLRDBAND);
24 MACRO(POLLPRI);
25 MACRO(POLLOUT);
26 MACRO(POLLWRNORM);
27 MACRO(POLLWRBAND);
28 MACRO(POLLERR);
29 MACRO(POLLHUP);
30 MACRO(POLLNVAL);
31
32 FUNCTION(poll, int (*f)(struct pollfd[], nfds_t, int));
Elliott Hughesf4d57ac2025-01-28 14:22:12 -080033#if !defined(__GLIBC__) // Our glibc is too old.
34 FUNCTION(ppoll, int (*f)(struct pollfd[], nfds_t, const struct timespec*, const sigset_t*));
35#endif
Elliott Hughes21b56eb2017-10-20 17:57:17 -070036}