aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYunchih Chen <yunchih.cat@gmail.com>2018-12-07 16:01:04 +0800
committerYunchih Chen <yunchih.cat@gmail.com>2018-12-07 16:01:04 +0800
commit465b62558a7ae1d37183e8f63dd49ddbc21a6a56 (patch)
tree1b41a56ca3f9ae9aac6b2ba1ebe3c3d8c87987d2
parentc1871007381c1b17db5c047f8b5472cd9d93fa0a (diff)
downloadnfcollect-465b62558a7ae1d37183e8f63dd49ddbc21a6a56.tar.gz
nfcollect-465b62558a7ae1d37183e8f63dd49ddbc21a6a56.tar.zst
nfcollect-465b62558a7ae1d37183e8f63dd49ddbc21a6a56.zip
Move macro def to file itself
-rw-r--r--bin/nfextract.c5
-rw-r--r--configure.ac5
2 files changed, 6 insertions, 4 deletions
diff --git a/bin/nfextract.c b/bin/nfextract.c
index 23a3ea9..1b14125 100644
--- a/bin/nfextract.c
+++ b/bin/nfextract.c
@@ -22,6 +22,11 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
+#define _XOPEN_SOURCE 700 // strptime
+#ifndef _POSIX_C_SOURCE
+#define _POSIX_C_SOURCE 200809 // strdup
+#endif
+
#include "extract.h"
#include "main.h"
#include "sql.h"
diff --git a/configure.ac b/configure.ac
index bf6aba8..e94fc79 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12,7 +12,7 @@ AC_CONFIG_AUX_DIR([build-aux])
# ChangeLog, COPYING, AUTHORS, INSTALL, README etc. files.
AM_INIT_AUTOMAKE([-Wall -Werror foreign dist-xz subdir-objects])
-#AM_SILENT_RULES([yes])
+AM_SILENT_RULES([yes])
AC_CONFIG_SRCDIR([bin/nfcollect.c])
AC_PROG_CC([clang])
@@ -29,9 +29,6 @@ if test x"$debug" = x"true"; then
AC_DEFINE(DEBUG, 1, [debug])
fi
-AC_DEFINE(_XOPEN_SOURCE, 700) # strptime
-AC_DEFINE(_POSIX_C_SOURCE, 200809) # strdup
-
AC_CHECK_HEADERS(libnetfilter_log/libnetfilter_log.h)
AC_SEARCH_LIBS(nflog_open, netfilter_log)