zeromq / libzmq

ZeroMQ core engine in C++, implements ZMTP/3.1
https://www.zeromq.org
Mozilla Public License 2.0
9.46k stars 2.34k forks source link

Build with -D_DEFAULT_SOURCE along with -std=c11 #4635

Closed fweimer-rh closed 7 months ago

fweimer-rh commented 7 months ago

On its own, -std=c11 hides POSIX and other extensions from C headers such as <stdlib.h> when building against glibc. This causes the posix_memalign probe to fail incorrectly with compilers that do not accept implicit function declarations. _DEFAULT_SOURCE is ignored by most non-GNU/Linux systems or not relevant in this context, so there is no separate check for adding it.

Related to: