On Wed, Feb 14, 2018 at 12:32:38PM -0500, Jason Duerstock wrote:
>...
> Patch attached.
>...
A more thorough fix would be the attached patches.
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
Description: Don't use __USE_GNU
__USE_GNU is a glibc-internal symbol.
AC_USE_SYSTEM_EXTENSIONS is the proper autoconf
way to enable extensions.
Author: Adrian Bunk
--- suricata-4.0.4.orig/configure.ac
+++ suricata-4.0.4/configure.ac
@@ -8,6 +8,7 @@
AC_LANG_C
AC_PROG_CC_C99
+AC_USE_SYSTEM_EXTENSIONS
AC_PROG_LIBTOOL
PKG_PROG_PKG_CONFIG
--- suricata-4.0.4.orig/src/suricata-common.h
+++ suricata-4.0.4/src/suricata-common.h
@@ -33,9 +33,6 @@
#define TRUE 1
#define FALSE 0
-#define _GNU_SOURCE
-#define __USE_GNU
-
#if HAVE_CONFIG_H
#include
#endif
Description: suricata-common.h must be the first file included
It brings the _GNU_SOURCE definition, that must be defined
before any other headers get included.
Author: Adrian Bunk
--- suricata-4.0.4.orig/src/app-layer-htp-body.c
+++ suricata-4.0.4/src/app-layer-htp-body.c
@@ -26,8 +26,8 @@
* This file provides a HTTP protocol support for the engine using HTP library.
*/
-#include "suricata.h"
#include "suricata-common.h"
+#include "suricata.h"
#include "debug.h"
#include "decode.h"
#include "threads.h"
--- suricata-4.0.4.orig/src/app-layer-htp-file.c
+++ suricata-4.0.4/src/app-layer-htp-file.c
@@ -24,8 +24,8 @@
* using HTP library.
*/
-#include "suricata.h"
#include "suricata-common.h"
+#include "suricata.h"
#include "debug.h"
#include "decode.h"
#include "threads.h"
--- suricata-4.0.4.orig/src/app-layer-htp-libhtp.c
+++ suricata-4.0.4/src/app-layer-htp-libhtp.c
@@ -39,8 +39,8 @@
* Anoop Saldanha
*/
-#include "suricata.h"
#include "suricata-common.h"
+#include "suricata.h"
#include "app-layer-htp-libhtp.h"
/**
--- suricata-4.0.4.orig/src/app-layer-htp-libhtp.h
+++ suricata-4.0.4/src/app-layer-htp-libhtp.h
@@ -42,8 +42,8 @@
#ifndef __APP_LAYER_HTP_LIBHTP__H__
#define __APP_LAYER_HTP_LIBHTP__H__
-#include "suricata.h"
#include "suricata-common.h"
+#include "suricata.h"
bstr *SCHTPGenerateNormalizedUri(htp_tx_t *tx, htp_uri_t *uri, int uri_include_all);
--- suricata-4.0.4.orig/src/app-layer-htp.c
+++ suricata-4.0.4/src/app-layer-htp.c
@@ -33,8 +33,8 @@
* This file provides a HTTP protocol support for the engine using HTP library.
*/
-#include "suricata.h"
#include "suricata-common.h"
+#include "suricata.h"
#include "conf.h"
#include "debug.h"
#include "decode.h"
--- suricata-4.0.4.orig/src/app-layer-smtp.c
+++ suricata-4.0.4/src/app-layer-smtp.c
@@ -21,8 +21,8 @@
* \author Anoop Saldanha
*/
-#include "suricata.h"
#include "suricata-common.h"
+#include "suricata.h"
#include "debug.h"
#include "decode.h"
#include "threads.h"
--- suricata-4.0.4.orig/src/conf-yaml-loader.c
+++ suricata-4.0.4/src/conf-yaml-loader.c
@@ -23,8 +23,9 @@
* YAML configuration loader.
*/
-#include
#include "suricata-common.h"
+
+#include
#include "conf.h"
#include "conf-yaml-loader.h"
#include "util-path.h"
--- suricata-4.0.4.orig/src/detect-engine-mpm.c
+++ suricata-4.0.4/src/detect-engine-mpm.c
@@ -24,8 +24,8 @@
* Multi pattern matcher
*/
-#include "suricata.h"
#include "suricata-common.h"
+#include "suricata.h"
#include "app-layer-protos.h"
--- suricata-4.0.4.orig/src/source-pfring.c
+++ suricata-4.0.4/src/source-pfring.c
@@ -28,11 +28,12 @@
* \todo Allow ring options such as snaplen etc, to be user configurable.
*/
+#include "suricata-common.h"
+
#ifdef HAVE_PFRING
#include
#endif /* HAVE_PFRING */
-#include "suricata-common.h"
#include "suricata.h"
#include "conf.h"
#include "decode.h"
--- suricata-4.0.4.orig/src/util-daemon.c
+++ suricata-4.0.4/src/util-daemon.c
@@ -23,8 +23,8 @@
* Daemonization process
*/
-#include "suricata.h"
#include "suricata-common.h"
+#include "suricata.h"
#include "runmodes.h"
#include "util-daemon.h"
#include "util-debug.h"
--- suricata-4.0.4.orig/src/util-decode-asn1.c
+++ suricata-4.0.4/src/util-decode-asn1.c
@@ -23,8 +23,8 @@
* Implements ASN1 decoding (needed for the asn1 keyword, BER, CER & DER)
*/
-#include "suricata.h"
#include "suricata-common.h"
+#include "suricata.h"
#include "decode.h"
#include "util-debug.h"
#include "util-unittest.h"
--- suricata-4.0.4.orig/src/util-logopenfile-tile.c
+++ suricata-4.0.4/src/util-logopenfile-tile.c
@@ -26,9 +26,11 @@
* files on the host system.
*
*/
-#include
#include "suricata-common.h" /* errno.h, string.h, etc. */
+
+#include
+
#include "tm-modules.h" /* LogFileCtx */
#include "conf.h"/* ConfNode, etc. */
#include "util-atomic.h"
---