]> git.ipfire.org Git - thirdparty/snort3.git/commitdiff
fixing alert_sfsocket
authorJosh <jrosenba@cisco.com>
Wed, 27 Aug 2014 19:30:55 +0000 (15:30 -0400)
committerJosh <jrosenba@cisco.com>
Wed, 27 Aug 2014 19:30:55 +0000 (15:30 -0400)
cmake/platforms.cmake
configure.ac
src/loggers/CMakeLists.txt
src/loggers/Makefile.am
src/loggers/alert_sf_socket.cc
src/loggers/loggers.cc

index 3fbe56f3e8851189898faaced9e6ff6a528b4c36..09a8d7cebd0d5b6e3cf12b6054c5ed5aaf019ed9 100644 (file)
@@ -27,7 +27,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "linux")
 endif ()
 
 if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
-    set(LINUX "YES")
+    set(LINUX "1")
 endif("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
 
 if (${CMAKE_SYSTEM_NAME} MATCHES "openbsd")
index 1c3dd3a63fa696513344b9bc171a05338fe8b2f9..4aac7deb2245cde4700d5e335a3be3d6affc8a9e 100644 (file)
@@ -141,8 +141,8 @@ AC_DEFUN([CC_VISIBILITY],
     CFLAGS="$gl_save_CFLAGS"
     if test "x$gl_cv_cc_visibility" = "xyes"; then
         # FIXIT should be hidden, default (visible) is workaround
-        #AM_CXXFLAGS="$AM_CXXFLAGS -fvisibility=hidden"
-        AM_CXXFLAGS="$AM_CXXFLAGS -fvisibility=default"
+        AM_CXXFLAGS="$AM_CXXFLAGS -fvisibility=hidden"
+        #AM_CXXFLAGS="$AM_CXXFLAGS -fvisibility=default"
         AC_DEFINE([HAVE_VISIBILITY],[1],
             [Define if the compiler supports visibility declarations.])
     fi
index 104e6f82e51c35625f0eb9347d3624fffaf59f4f..ac56fa61c3f28a0ea53536942a308a3ac5743953 100644 (file)
@@ -21,8 +21,8 @@ set (PLUGIN_LIST
 )
 
 if (LINUX)
-    set ( PLUGIN_LIST
-        ${PLUGIN_LIST}
+    set ( LOGGER_SOURCES
+        ${LOGGER_SOURCES}
         alert_sf_socket.cc
     )
 endif()
@@ -51,9 +51,5 @@ else (STATIC_LOGGERS)
     add_shared_library(log_tcpdump loggers log_tcpdump.cc)
     add_shared_library(unified2 loggers unified2.cc unified2_common.h)
 
-    if (LINUX)
-        add_shared_library(alert_sf_socket loggers alert_sf_socket.cc)
-    endif  (LINUX)
-
 endif (STATIC_LOGGERS)
 
index 8bd4baad528627f7cfe2c1b09cd56f75e5efb0aa..d3ac06cf79b6e73271e3ae6f09e551d9d12b16a9 100644 (file)
@@ -18,13 +18,14 @@ log_tcpdump.cc \
 unified2.cc \
 unified2_common.h
 
-if STATIC_LOGGERS
-libloggers_a_SOURCES += $(plugin_list)
-
 if LINUX
 libloggers_a_SOURCES += alert_sf_socket.cc
 endif
 
+
+if STATIC_LOGGERS
+libloggers_a_SOURCES += $(plugin_list)
+
 else
 ehlibdir = $(pkglibdir)/loggers
 
@@ -43,13 +44,6 @@ libalert_full_la_CXXFLAGS = $(AM_CXXFLAGS) -DBUILDING_SO
 libalert_full_la_LDFLAGS = -export-dynamic -shared
 libalert_full_la_SOURCES = alert_full.cc
 
-if LINUX
-ehlib_LTLIBRARIES += libalert_sf_socket.la
-libalert_sf_socket_la_CXXFLAGS = $(AM_CXXFLAGS) -DBUILDING_SO
-libalert_sf_socket_la_LDFLAGS = -export-dynamic -shared
-libalert_sf_socket_la_SOURCES = alert_sf_socket.cc
-endif
-
 ehlib_LTLIBRARIES += libalert_syslog.la
 libalert_syslog_la_CXXFLAGS = $(AM_CXXFLAGS) -DBUILDING_SO
 libalert_syslog_la_LDFLAGS = -export-dynamic -shared
index 5ae9da6a000352a91f8e5805a7c2809115f09986..9e42268c40feda0bfa202067ec93c5dc4a8c592c 100644 (file)
@@ -45,7 +45,7 @@
 #include "treenodes.h"
 #include "snort_debug.h"
 #include "util.h"
-#include "snort.h"
+#include "main/snort.h"
 #include "parser.h"
 
 struct SfSock
@@ -408,15 +408,7 @@ static LogApi sf_sock_api
     sf_sock_dtor
 };
 
-#ifdef BUILDING_SO
-SO_PUBLIC const BaseApi* snort_plugins[] =
-{
-    &sf_sock_api.base,
-    nullptr
-};
-#else
 const BaseApi* alert_sf_socket = &sf_sock_api.base;
-#endif
 
 #endif   /* LINUX */
 
index 6688e3cac2d2adbb396ee40890f8fb492f29f06a..3370c93c9d1dcd8221409b689d1408a1d7b7cc42 100644 (file)
 
 #include "framework/logger.h"
 
+#ifdef LINUX
+extern const BaseApi* alert_sf_socket;
+#endif
+
 #ifdef STATIC_LOGGERS
 extern const BaseApi* alert_csv;
 extern const BaseApi* alert_fast;
 extern const BaseApi* alert_full;
-#ifdef LINUX
-extern const BaseApi* alert_sf_socket;
-#endif
 extern const BaseApi* alert_syslog;
 extern const BaseApi* alert_test;
 extern const BaseApi* alert_unix_sock;
@@ -43,6 +44,10 @@ extern const BaseApi* eh_unified2;
 
 const BaseApi* loggers[] =
 {
+#ifdef LINUX
+    alert_sf_socket,
+#endif
+
 #ifdef STATIC_LOGGERS
     // alerters
     alert_fast,
@@ -50,9 +55,6 @@ const BaseApi* loggers[] =
     alert_syslog,
     alert_test,
     alert_csv,
-#ifdef LINUX
-    alert_sf_socket,
-#endif
     alert_unix_sock,
     // loggers
     log_null,