The feature macro _GNU_SOURCE is defined globally,
but there was some remaining useless settings.
The internal definition in config/meson.build is kept,
all other internal definitions of _GNU_SOURCE are removed,
except in examples, which can be built as external applications.
Note: external applications do not inherit of _GNU_SOURCE.
Fixes:
5d7b673d5fd6 ("mk: build with _GNU_SOURCE defined by default")
Fixes:
28188cee2aa0 ("build: enable BSD features visibility for FreeBSD")
Fixes:
e6cdc54cc0ef ("net/mlx5: add socket server for external tools")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: David Marchand <david.marchand@redhat.com>
cflags += '-Wno-format-truncation'
endif
-# specify -D_GNU_SOURCE unconditionally
-cflags += '-D_GNU_SOURCE'
# Strict-aliasing rules are violated by uint8_t[] to context size casts.
cflags += '-fno-strict-aliasing'
#ifndef HEADER_COMPAT_H
#define HEADER_COMPAT_H
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#define __COMPAT_H
#include <sched.h>
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
#include <stdint.h>
#include <stdlib.h>
#include <stddef.h>
includes += include_directories('caamflib')
-cflags += ['-D_GNU_SOURCE']
if cc.has_argument('-Wno-cast-qual')
cflags += '-Wno-cast-qual'
endif
#ifndef _RTE_ETH_MEMIF_H_
#define _RTE_ETH_MEMIF_H_
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif /* GNU_SOURCE */
-
#include <sys/queue.h>
#include <ethdev_driver.h>
* Copyright 2019 Mellanox Technologies, Ltd
*/
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>