]> git.ipfire.org Git - thirdparty/zlib-ng.git/commit
Pass POSIX_C_SOURCE for std::alligned_alloc try_compile checks
authorCristi Vîjdea <cvijdea@bitdefender.com>
Fri, 4 Apr 2025 13:32:36 +0000 (16:32 +0300)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Mon, 7 Apr 2025 21:36:27 +0000 (23:36 +0200)
commitb2a0ffb5e98aa534682031a95af42de6fc184338
treef50f50b0b2cdd6f8814a74d01f4abc88609b0812
parente88471f3795170e6fe63e384b77b71ab5c46d9ad
Pass POSIX_C_SOURCE for std::alligned_alloc try_compile checks

On FreeBSD 11, definining POSIX_C_SOURCE to a lower level has the efect of inhibiting the language level (__ISO_C_VISIBLE ) to be lower than C11, even in the presence of -std=c11

Since the check_symbol_exists runs without setting POSIX_C_SOURCE, this means that we will spuriously define HAVE_ALIGNED_ALLOC, while in the actual build it is not going to be defined

ref: https://github.com/freebsd/freebsd-src/blob/stable/11/sys/sys/cdefs.h#L738
CMakeLists.txt
configure