buildroot/package/snort/0001-configure.in-Avoid-path-poisoning-with-libpcap.patch
Sergio Prado e80c892427 package/snort: new package
Tested on Beaglebone Black.

Build-tested with test-pkg.

Patch to fix cross-compilation errors submitted upstream [1].

[1] https://lists.snort.org/pipermail/snort-devel/2018-January/011025.html

Signed-off-by: Sergio Prado <sergio.prado@e-labworks.com>
[Romain:
 - split patch by build issues
 - convert AC_RUN_IFELSE to AC_CHECK_MEMBERS (ThomasP)
 - convert AC_RUN_IFELSE to AC_COMPILE_IFELSE (ThomasP)
 - remove most make variable from SNORT_CONF_ENV
 - remove SNORT_SOURCE default value]
Signed-off-by: Romain Naour <romain.naour@smile.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-04-01 18:42:21 +02:00

36 lines
1,023 B
Diff

From 732459ca3423799ae3386df3de3f5d6ea2af1b95 Mon Sep 17 00:00:00 2001
From: Romain Naour <romain.naour@smile.fr>
Date: Sun, 1 Apr 2018 15:18:51 +0200
Subject: [PATCH] configure.in: Avoid path poisoning with libpcap
Prevent usage of unsafe libpcap header path when cross compiling.
Signed-off-by: Romain Naour <romain.naour@smile.fr>
Cc: Sergio Prado <sergio.prado@e-labworks.com>
---
From http://patchwork.ozlabs.org/patch/860363/
---
configure.in | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/configure.in b/configure.in
index 4b3a5db..1e940b1 100644
--- a/configure.in
+++ b/configure.in
@@ -70,8 +70,10 @@ case "$host" in
*-linux*)
linux="yes"
AC_DEFINE([LINUX],[1],[Define if Linux])
- AC_SUBST(extra_incl)
- extra_incl="-I/usr/include/pcap"
+ if test -z "x$with_libpcap_includes"; then
+ AC_SUBST(extra_incl)
+ extra_incl="-I/usr/include/pcap"
+ fi
;;
*-hpux10*|*-hpux11*)
AC_DEFINE([HPUX],[1],[Define if HP-UX 10 or 11])
--
2.14.3