Snort mailing list archives

Re: Bus error on sparc


From: Michael Bell <michael.bell () cms hu-berlin de>
Date: Tue, 13 May 2003 16:11:54 +0200

Hi all,

I checked spp_stream4.c and find out that there is special code for HP-UX, Solaris and SunOS. All systems are 64-bit system.

I changed configure.in and spp_stream4.c to integrate a switch for 64-bit linux (or more correct sparc). I used autoconf and autoheader. After configure; make; make install now everything works fine even with stream4 enabled.

I attached diffs for configure.in and spp_stream4.c but I don't attached config.h.in and configure because I don't know which version of the autotools do you use by default.

Best regards

Michael
--
-------------------------------------------------------------------
Michael Bell                   Email: michael.bell () cms hu-berlin de
ZE Computer- und Medienservice            Tel.: +49 (0)30-2093 2482
(Computing Centre)                        Fax:  +49 (0)30-2093 2704
Humboldt-University of Berlin
Unter den Linden 6
10099 Berlin                   Email (private): michael.bell () web de
Germany                                       http://www.openca.org
--- snort-2.0.0/configure.in    2003-04-09 18:01:26.000000000 +0200
+++ configure.in        2003-05-13 13:37:03.000000000 +0200
@@ -74,6 +74,15 @@
     AC_DEFINE(SUNOS)
     sunos4=yes
     ;;
+  *sparc*-linux*)
+    linux=yes
+    AC_DEFINE(LINUX)
+    AC_DEFINE(LINUX64, 1, '64-bit linux')
+    AC_DEFINE(PCAP_TIMEOUT_IGNORED)  # libpcap doesn't even LOOK at
+                                     # the timeout you give it under Linux
+    AC_SUBST(extra_incl)
+    extra_incl=-I/usr/include/pcap
+    ;;
   *-linux*)
     linux=yes
     AC_DEFINE(LINUX)
--- snort-2.0.0/src/preprocessors/spp_stream4.c 2003-04-11 22:45:17.000000000 +0200
+++ spp_stream4.c       2003-05-13 13:03:27.000000000 +0200
@@ -153,7 +153,7 @@
 /* We must twiddle to align the offset the ethernet header and align
    the IP header on solaris -- maybe this will work on HPUX too.
 */
-#if defined (SOLARIS) || defined (SUNOS) || defined (HPUX)
+#if defined (SOLARIS) || defined (SUNOS) || defined (HPUX) || defined (LINUX64)
 #define SPARC_TWIDDLE       2
 #else
 #define SPARC_TWIDDLE       0

Current thread: