From 191d38dee89dd1e03e525ec2d24a8a1210751517 Mon Sep 17 00:00:00 2001 From: Jakub Michalski Date: Wed, 30 Oct 2024 16:39:33 +0100 Subject: [PATCH] posix: define POLLPRI in posix/poll.h Add the POLLPRI constant defined by POSIX and test for it. Signed-off-by: Jakub Michalski Signed-off-by: Maciej Sobkowski --- include/zephyr/posix/poll.h | 1 + tests/posix/headers/src/poll_h.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/zephyr/posix/poll.h b/include/zephyr/posix/poll.h index 3f85ace5f7d..aa2c89210dd 100644 --- a/include/zephyr/posix/poll.h +++ b/include/zephyr/posix/poll.h @@ -17,6 +17,7 @@ typedef unsigned int nfds_t; #define pollfd zsock_pollfd #define POLLIN ZSOCK_POLLIN +#define POLLPRI ZSOCK_POLLPRI #define POLLOUT ZSOCK_POLLOUT #define POLLERR ZSOCK_POLLERR #define POLLHUP ZSOCK_POLLHUP diff --git a/tests/posix/headers/src/poll_h.c b/tests/posix/headers/src/poll_h.c index c88fb1adb4f..260a054722b 100644 --- a/tests/posix/headers/src/poll_h.c +++ b/tests/posix/headers/src/poll_h.c @@ -28,7 +28,7 @@ ZTEST(posix_headers, test_poll_h) zassert_not_equal(-1, POLLIN); /* zassert_not_equal(-1, POLLRDNORM); */ /* not implemented */ /* zassert_not_equal(-1, POLLRDBAND); */ /* not implemented */ - /* zassert_not_equal(-1, POLLPRI); */ /* not implemented */ + zassert_not_equal(-1, POLLPRI); zassert_not_equal(-1, POLLOUT); /* zassert_not_equal(-1, POLLWRNORM); */ /* not implemented */ /* zassert_not_equal(-1, POLLWRBAND); */ /* not implemented */