diff --git a/include/dlfcn.h b/include/dlfcn.h --- a/include/dlfcn.h +++ b/include/dlfcn.h @@ -80,7 +80,7 @@ const char *dli_sname; /* Name of nearest symbol. */ void *dli_saddr; /* Address of nearest symbol. */ } Dl_info; -#if __POSIX_VISIBLE >= 202405 +#if __POSIX_VISIBLE >= 202405 || __BSD_VISIBLE typedef struct dl_info Dl_info_t; #endif @@ -122,7 +122,7 @@ void *dlopen(const char *, int); void *dlsym(void * __restrict, const char * __restrict); -#if __POSIX_VISIBLE >= 202405 +#if __POSIX_VISIBLE >= 202405 || __BSD_VISIBLE int dladdr(const void * __restrict, Dl_info * __restrict); #endif diff --git a/include/stdlib.h b/include/stdlib.h --- a/include/stdlib.h +++ b/include/stdlib.h @@ -157,7 +157,8 @@ /* * If we're in a mode greater than C99, expose C11 functions. */ -#if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L || __POSIX_VISIBLE >= 202405 +#if __ISO_C_VISIBLE >= 2011 || __cplusplus >= 201103L || \ + __POSIX_VISIBLE >= 202405 || __BSD_VISIBLE void * aligned_alloc(size_t, size_t) __malloc_like __alloc_align(1) __alloc_size(2); int at_quick_exit(void (*)(void)) __noexcept; @@ -236,7 +237,7 @@ int ptsname_r(int, char *, size_t); #endif -#if __POSIX_VISIBLE >= 202405 +#if __POSIX_VISIBLE >= 202405 || __BSD_VISIBLE void qsort_r(void *, size_t, size_t, int (*)(const void *, const void *, void *), void *); void *reallocarray(void *, size_t, size_t) __result_use_check diff --git a/include/string.h b/include/string.h --- a/include/string.h +++ b/include/string.h @@ -63,7 +63,7 @@ #endif int memcmp(const void *, const void *, size_t) __pure; void *(memcpy)(void * __restrict, const void * __restrict, size_t); -#if __POSIX_VISIBLE >= 202405 +#if __POSIX_VISIBLE >= 202405 || __BSD_VISIBLE void *(memmem)(const void *, size_t, const void *, size_t) __pure; #endif void *(memmove)(void *, const void *, size_t); @@ -98,7 +98,7 @@ #if __POSIX_VISIBLE >= 200112 int strerror_r(int, char *, size_t); #endif -#if __POSIX_VISIBLE >= 202405 +#if __POSIX_VISIBLE >= 202405 || __BSD_VISIBLE size_t (strlcat)(char * __restrict, const char * __restrict, size_t); size_t (strlcpy)(char * __restrict, const char * __restrict, size_t); #endif diff --git a/include/time.h b/include/time.h --- a/include/time.h +++ b/include/time.h @@ -180,12 +180,12 @@ #include #endif -#if __ISO_C_VISIBLE >= 2011 || __POSIX_VISIBLE >= 202405 || \ +#if __ISO_C_VISIBLE >= 2011 || __POSIX_VISIBLE >= 202405 || __BSD_VISIBLE || \ (defined(__cplusplus) && __cplusplus >= 201703) #include /* ISO/IEC 9899:2011 7.27.2.5 The timespec_get function */ #define TIME_UTC 1 /* time elapsed since epoch */ -#if __ISO_C_VISIBLE >= 2023 || __POSIX_VISIBLE >= 202405 +#if __ISO_C_VISIBLE >= 2023 || __POSIX_VISIBLE >= 202405 || __BSD_VISIBLE /* ISO/IEC 9899:2024 7.29.1 Components of time */ #define TIME_MONOTONIC 2 /* monotonic time */ #endif diff --git a/include/unistd.h b/include/unistd.h --- a/include/unistd.h +++ b/include/unistd.h @@ -484,7 +484,7 @@ #endif /* 1003.1-2024 */ -#if __POSIX_VISIBLE >= 202405 +#if __POSIX_VISIBLE >= 202405 || __BSD_VISIBLE pid_t _Fork(void); int getentropy(void *, size_t); int getresgid(gid_t *, gid_t *, gid_t *); diff --git a/include/wchar.h b/include/wchar.h --- a/include/wchar.h +++ b/include/wchar.h @@ -235,7 +235,7 @@ size_t, mbstate_t * __restrict); #endif -#if __POSIX_VISIBLE >= 202405 +#if __POSIX_VISIBLE >= 202405 || __BSD_VISIBLE size_t wcslcat(wchar_t *, const wchar_t *, size_t); size_t wcslcpy(wchar_t *, const wchar_t *, size_t); #endif