aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2024-12-15 04:40:16 +0000
committerKyle Evans <kevans@FreeBSD.org>2024-12-15 04:40:16 +0000
commit74ecdf86d8d2a94a4bfcf094a2e21b4747e4907f (patch)
treed85241cd23eb7b17e80f499ec148f82e2ff7dada
parent1a2a0db0a9ecf0f761eadbfe81289515a7efa5f0 (diff)
Tweak ppoll() to include 1003.1-2024 visibility, take two
Note in the manpage that the 2024 edition finally added ppoll(), and also add the appropriate declarations for the correct versions of _POSIX_C_SOURCE (via __POSIX_VISIBLE). Differential Revision: https://reviews.freebsd.org/D48043
-rw-r--r--include/ssp/poll.h4
-rw-r--r--lib/libsys/poll.25
-rw-r--r--sys/sys/poll.h4
3 files changed, 7 insertions, 6 deletions
diff --git a/include/ssp/poll.h b/include/ssp/poll.h
index 815e73eb46b7..90a8b368b8bf 100644
--- a/include/ssp/poll.h
+++ b/include/ssp/poll.h
@@ -42,7 +42,7 @@ __ssp_redirect_raw_impl(int, poll, poll,
return (__ssp_real(poll)(fds, nfds, timeout));
}
-#if __BSD_VISIBLE
+#if __POSIX_VISIBLE >= 202405
__ssp_redirect_raw_impl(int, ppoll, ppoll,
(struct pollfd fds[], nfds_t nfds,
const struct timespec *__restrict timeout,
@@ -53,7 +53,7 @@ __ssp_redirect_raw_impl(int, ppoll, ppoll,
return (__ssp_real(ppoll)(fds, nfds, timeout, newsigmask));
}
-#endif /* __BSD_VISIBLE */
+#endif /* __POSIX_VISIBLE >= 202405 */
__END_DECLS
#endif /* __SSP_FORTIFY_LEVEL > 0 */
diff --git a/lib/libsys/poll.2 b/lib/libsys/poll.2
index 6a5cc1dc3a89..6e6ed33f7a6b 100644
--- a/lib/libsys/poll.2
+++ b/lib/libsys/poll.2
@@ -27,7 +27,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd April 27, 2021
+.Dd December 11, 2024
.Dt POLL 2
.Os
.Sh NAME
@@ -268,7 +268,8 @@ function conforms to
.St -p1003.1-2001 .
The
.Fn ppoll
-is not specified by POSIX.
+function conforms to
+.St -p1003.1-2024 .
The
POLLRDHUP
flag is not specified by POSIX, but is compatible with Linux and illumos.
diff --git a/sys/sys/poll.h b/sys/sys/poll.h
index d5f2c0373942..4f34210ea1c9 100644
--- a/sys/sys/poll.h
+++ b/sys/sys/poll.h
@@ -96,7 +96,7 @@ struct pollfd {
#ifndef _KERNEL
-#if __BSD_VISIBLE
+#if __POSIX_VISIBLE >= 202405
#include <sys/_types.h>
#include <sys/_sigset.h>
@@ -115,7 +115,7 @@ typedef __sigset_t sigset_t;
__BEGIN_DECLS
int poll(struct pollfd _pfd[], nfds_t _nfds, int _timeout);
-#if __BSD_VISIBLE
+#if __POSIX_VISIBLE >= 202405
int ppoll(struct pollfd _pfd[], nfds_t _nfds,
const struct timespec *__restrict _timeout,
const sigset_t *__restrict _newsigmask);