build: remove redundant _GNU_SOURCE definitions
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:5d7b673d5f
("mk: build with _GNU_SOURCE defined by default") Fixes:28188cee2a
("build: enable BSD features visibility for FreeBSD") Fixes:e6cdc54cc0
("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>
This commit is contained in:
parent
1cd512b2f5
commit
e0ae50c687
@ -398,8 +398,6 @@ if cc.has_argument('-Wno-format-truncation')
|
||||
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'
|
||||
|
||||
|
@ -8,9 +8,6 @@
|
||||
#ifndef HEADER_COMPAT_H
|
||||
#define HEADER_COMPAT_H
|
||||
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -10,10 +10,6 @@
|
||||
#define __COMPAT_H
|
||||
|
||||
#include <sched.h>
|
||||
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <stddef.h>
|
||||
|
@ -10,7 +10,6 @@ sources = files('dpaax_iova_table.c', 'dpaa_of.c', 'caamflib.c')
|
||||
|
||||
includes += include_directories('caamflib')
|
||||
|
||||
cflags += ['-D_GNU_SOURCE']
|
||||
if cc.has_argument('-Wno-cast-qual')
|
||||
cflags += '-Wno-cast-qual'
|
||||
endif
|
||||
|
@ -5,10 +5,6 @@
|
||||
#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>
|
||||
|
@ -2,10 +2,6 @@
|
||||
* Copyright 2019 Mellanox Technologies, Ltd
|
||||
*/
|
||||
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
|
Loading…
Reference in New Issue
Block a user