git: 94b666c663d2 - main - cdefs: Allow _XOPEN_SOURCE >= 800

From: Warner Losh <imp_at_FreeBSD.org>
Date: Fri, 15 Nov 2024 02:02:06 UTC
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=94b666c663d2fde93f438e9643e7b510b83ca10b

commit 94b666c663d2fde93f438e9643e7b510b83ca10b
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2024-11-14 23:52:19 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2024-11-15 01:57:27 +0000

    cdefs: Allow _XOPEN_SOURCE >= 800
    
    When the user asks for XOPEN_SOURCE >= 800, set __XSI_VISIBLE to 800 for
    POSIX 2024.
    
    Sponsored by:           Netflix
    Reviewed by:            brooks
    Differential Revision:  https://reviews.freebsd.org/D47574
---
 sys/sys/cdefs.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/sys/sys/cdefs.h b/sys/sys/cdefs.h
index 6521a34595cb..bafceb8cb9cb 100644
--- a/sys/sys/cdefs.h
+++ b/sys/sys/cdefs.h
@@ -515,7 +515,11 @@
 
 /* Deal with various X/Open Portability Guides and Single UNIX Spec. */
 #ifdef _XOPEN_SOURCE
-#if _XOPEN_SOURCE - 0 >= 700
+#if _XOPEN_SOURCE - 0 >= 800
+#define	__XSI_VISIBLE		800
+#undef _POSIX_C_SOURCE
+#define	_POSIX_C_SOURCE		202405
+#elif _XOPEN_SOURCE - 0 >= 700
 #define	__XSI_VISIBLE		700
 #undef _POSIX_C_SOURCE
 #define	_POSIX_C_SOURCE		200809