Set _DEFAULT_SOURCE and _GNU_SOURCE globally. (#2010)
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
@@ -29,6 +29,8 @@ AC_ARG_WITH(nbpf-path, AS_HELP_STRING([--with-nbpf-path], [nBPF library custom p
|
|||||||
AC_ARG_WITH(lto-and-gold-linker, AS_HELP_STRING([--with-lto-and-gold-linker], [Build with LTO and Gold linker]))
|
AC_ARG_WITH(lto-and-gold-linker, AS_HELP_STRING([--with-lto-and-gold-linker], [Build with LTO and Gold linker]))
|
||||||
AC_ARG_ENABLE(debug-build, AS_HELP_STRING([--enable-debug-build], [Enable debug build (`-g` flag)]),[enable_debugbuild=$enableval],[enable_debugbuild=no])
|
AC_ARG_ENABLE(debug-build, AS_HELP_STRING([--enable-debug-build], [Enable debug build (`-g` flag)]),[enable_debugbuild=$enableval],[enable_debugbuild=no])
|
||||||
|
|
||||||
|
NDPI_CFLAGS="${NDPI_CFLAGS} -D_DEFAULT_SOURCE=1 -D_GNU_SOURCE=1"
|
||||||
|
|
||||||
AS_IF([test "x$enable_fuzztargets" = "xyes"], [
|
AS_IF([test "x$enable_fuzztargets" = "xyes"], [
|
||||||
BUILD_FUZZTARGETS=1
|
BUILD_FUZZTARGETS=1
|
||||||
NDPI_CFLAGS="${NDPI_CFLAGS} -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION"
|
NDPI_CFLAGS="${NDPI_CFLAGS} -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION"
|
||||||
|
|||||||
@@ -21,9 +21,6 @@
|
|||||||
#include "ndpi_config.h"
|
#include "ndpi_config.h"
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
#ifndef _GNU_SOURCE
|
|
||||||
#define _GNU_SOURCE
|
|
||||||
#endif
|
|
||||||
#include <sched.h>
|
#include <sched.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -41,8 +41,6 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define _GNU_SOURCE
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
// #include <sys/time.h>
|
// #include <sys/time.h>
|
||||||
|
|||||||
Vendored
-3
@@ -81,9 +81,6 @@
|
|||||||
#ifndef INCLUDE_PORTABILITY_H_
|
#ifndef INCLUDE_PORTABILITY_H_
|
||||||
#define INCLUDE_PORTABILITY_H_
|
#define INCLUDE_PORTABILITY_H_
|
||||||
|
|
||||||
#ifndef _GNU_SOURCE
|
|
||||||
#define _GNU_SOURCE 1
|
|
||||||
#endif // _GNU_SOURCE
|
|
||||||
#ifndef __STDC_FORMAT_MACROS
|
#ifndef __STDC_FORMAT_MACROS
|
||||||
#define __STDC_FORMAT_MACROS 1
|
#define __STDC_FORMAT_MACROS 1
|
||||||
#endif // __STDC_FORMAT_MACROS
|
#endif // __STDC_FORMAT_MACROS
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
#define _DEFAULT_SOURCE
|
|
||||||
#define _GNU_SOURCE
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|||||||
@@ -19,9 +19,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
#ifndef _GNU_SOURCE
|
|
||||||
#define _GNU_SOURCE
|
|
||||||
#endif
|
|
||||||
#include <sched.h>
|
#include <sched.h>
|
||||||
#endif /* linux */
|
#endif /* linux */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user