static_assert isn't defined in <assert.h> even though it's in the C11 standard. See C11 standard (ISO/IEC 9899:2011) section 7.2 Diagnostics <assert.h> (p: 186-187). - Example failure: https://builds.sr.ht/~emersion/job/643193 - Reference: https://en.cppreference.com/w/c/language/_Static_assert Suggested fix: remove !defined(__cplusplus) here: https://github.com/freebsd/freebsd-src/blob/9c612a5d0af17021abc6e1bb2a8baa5a4c97d05f/include/assert.h#L72
C and C++ are different languages. You are using C standard to request C++ feature that is explicitly disallowed by C++ standard: from ISO/IEC 14882:2017(E) 22.3.1 Header <cassert> synopsis [cassert.syn] #define assert(E) see below 1 The contents are the same as the C standard library header <assert.h>, except that a macro named static_assert is not defined.
wlroots itself doesn't use C++, so 14.0-CURRENT was already fixed. https://www.freebsd.org/releases/14.0R/schedule/ hasn't been populated yet, so -RELEASE is at least 1 year away. On older versions one can do something like #if defined(__FreeBSD__) && __FreeBSD__ < 14 #undef _POSIX_C_SOURCE #endif or #ifdef __FreeBSD__ #include <osreldate.h> # if __FreeBSD_version < 1400014 #undef _POSIX_C_SOURCE # endif #endif *** This bug has been marked as a duplicate of bug 255290 ***
Oh sorry I misread the conditional. Indeed it seems like a dup of 255290.
MARKED AS SPAM