Define _GNU_SOURCE, required for O_CLOEXEC on uClibc

When building sysklogd on a uClibc system we must define _GNU_SOURCE to
get O_CLOEXEC.

Since _GNU_SOURCE is also required for asprintf() with GLIBC, as used by
the pidfile() replacement function, we drop it from there and rely on
AM_CPPFLAGS for all sources.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2020-08-30 11:41:45 +02:00
parent 91a51cffbe
commit 93117e5801
2 changed files with 1 additions and 2 deletions

View File

@@ -31,7 +31,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#define _GNU_SOURCE /* Needed with GLIBC to get asprintf() */
#include <sys/stat.h> /* utimensat() */
#include <sys/time.h> /* utimensat() on *BSD */
#include <sys/types.h>