Snort mailing list archives
Re: Snort on Mac OS X 10.2.8: Which version of Snort can I use?
From: Todd Wease <twease () sourcefire com>
Date: Wed, 24 Dec 2008 01:59:30 -0500
Hi Ian, Sorry about that. Forgot some includes that are necessary to compile with those changes. Can you give it a try again with attached patch? And thanks for taking the time to test this out. (Note, I don't think you'll be able to compile with --enable-targetbased because one of bison/flex might end up compiling their C files using uint* instead of u_int* - all other configure options should hopefully be okay.) Thanks, Todd Ian Masters wrote:
Hi Todd Thanks for the suggestionCan you try the attached patch and let us know if it fixes the compile error. $ cp mac1028.diff snort-2.8.3.1 $ cd snort-2.8.3.1 $ patch -p0 < mac1028.diff $ libtoolize --automake --copy $ aclocal -I m4 $ autoheader $ automake --add-missing --copy $ autoconf $ ./configure <your-configure-options> $ makeI tried the above, but libtoolize doesn't exist on my system so in order to take things further I tried with 'glibtoolize'. Then I was able to get as far as 'make' in your instructions but the compile error persists. I've pasted it in below my signature in case it might be useful. Thanks Ian
? log
? mac1028.diff
? out
? rules.work
? ylwrap
? etc/snort.conf.work
? src/out
? src/u_int.out
? src/uint.out
? src/dynamic-plugins/sf_engine/sf_types.h
Index: configure.in
===================================================================
RCS file: /usr/cvsroot/sfeng/ims/sfsnort/snort/configure.in,v
retrieving revision 1.100.2.1
diff -p -u -r1.100.2.1 configure.in
--- configure.in 15 Dec 2008 22:42:59 -0000 1.100.2.1
+++ configure.in 24 Dec 2008 06:31:37 -0000
@@ -134,18 +134,15 @@ case "$host" in
;;
*-aix*)
AC_DEFINE(AIX,,[Define if AIX])
- broken_types=yes
;;
*-osf4*)
AC_DEFINE(OSF1,,[Define if OSF1])
- tru64_types=yes
;;
*-osf5.1*)
AC_DEFINE(OSF1)
;;
*-tru64*)
AC_DEFINE(OSF1)
- tru64_types=yes
;;
# it is actually <platform>-apple-darwin1.2 or <platform>-apple-rhapsody5.x but lets stick with this for the moment
*-apple*)
@@ -1418,21 +1415,8 @@ if test "x$enable_ipv6" = "xyes"; then
fi
fi
-if test "$tru64_types" = "yes"; then
- AC_CHECK_TYPE(u_int8_t, unsigned char)
- AC_CHECK_TYPE(u_int16_t, unsigned short)
- AC_CHECK_TYPE(u_int32_t, unsigned int)
-else
- if test "$broken_types" = "yes" ; then
- AC_CHECK_TYPE(u_int8_t, unsigned char)
- AC_CHECK_TYPE(u_int16_t, unsigned short)
- AC_CHECK_TYPE(u_int32_t, unsigned long int)
- else
- AC_CHECK_TYPE(u_int8_t, uint8_t)
- AC_CHECK_TYPE(u_int16_t, uint16_t)
- AC_CHECK_TYPE(u_int32_t, uint32_t)
- fi
-fi
+# Check for int types
+AC_CHECK_TYPES([u_int8_t,u_int16_t,u_int32_t,uint8_t,uint16_t,uint32_t])
# let's make some fixes..
Index: src/bounds.h
===================================================================
RCS file: /usr/cvsroot/sfeng/ims/sfsnort/snort/src/bounds.h,v
retrieving revision 1.12.6.2
diff -p -u -r1.12.6.2 bounds.h
--- src/bounds.h 12 Aug 2008 20:30:52 -0000 1.12.6.2
+++ src/bounds.h 24 Dec 2008 06:31:37 -0000
@@ -40,6 +40,7 @@
#define SAFEMEM_ERROR 0
#define SAFEMEM_SUCCESS 1
+#include "sf_types.h"
#include "debug.h"
#ifndef DEBUG
#define ERRORRET return SAFEMEM_ERROR;
Index: src/byte_extract.c
===================================================================
RCS file: /usr/cvsroot/sfeng/ims/sfsnort/snort/src/byte_extract.c,v
retrieving revision 1.7
diff -p -u -r1.7 byte_extract.c
--- src/byte_extract.c 10 Jul 2008 08:42:50 -0000 1.7
+++ src/byte_extract.c 24 Dec 2008 06:31:37 -0000
@@ -29,6 +29,7 @@
#endif
#include <errno.h>
+#include "sf_types.h"
#include "bounds.h"
#include "byte_extract.h"
#include "debug.h"
Index: src/byte_extract.h
===================================================================
RCS file: /usr/cvsroot/sfeng/ims/sfsnort/snort/src/byte_extract.h,v
retrieving revision 1.5
diff -p -u -r1.5 byte_extract.h
--- src/byte_extract.h 25 Feb 2008 19:09:46 -0000 1.5
+++ src/byte_extract.h 24 Dec 2008 06:31:37 -0000
@@ -22,6 +22,8 @@
#ifndef _BYTE_EXTRACT_H
#define _BYTE_EXTRACT_H
+#include "sf_types.h"
+
#define BIG 0
#define LITTLE 1
Index: src/checksum.h
===================================================================
RCS file: /usr/cvsroot/sfeng/ims/sfsnort/snort/src/checksum.h,v
retrieving revision 1.6
diff -p -u -r1.6 checksum.h
--- src/checksum.h 25 Feb 2008 21:32:16 -0000 1.6
+++ src/checksum.h 24 Dec 2008 06:31:37 -0000
@@ -36,6 +36,7 @@
#endif
#include <sys/types.h>
+#include "sf_types.h"
/* define checksum error flags */
Index: src/decode.c
===================================================================
RCS file: /usr/cvsroot/sfeng/ims/sfsnort/snort/src/decode.c,v
retrieving revision 1.114.2.1
diff -p -u -r1.114.2.1 decode.c
--- src/decode.c 7 Aug 2008 11:54:30 -0000 1.114.2.1
+++ src/decode.c 24 Dec 2008 06:31:38 -0000
@@ -31,6 +31,7 @@
#include <string.h>
#include <stdlib.h>
+#include "sf_types.h"
#include "decode.h"
#include "snort.h"
#include "debug.h"
Index: src/decode.h
===================================================================
RCS file: /usr/cvsroot/sfeng/ims/sfsnort/snort/src/decode.h,v
retrieving revision 1.81.2.1
diff -p -u -r1.81.2.1 decode.h
--- src/decode.h 7 Aug 2008 11:54:30 -0000 1.81.2.1
+++ src/decode.h 24 Dec 2008 06:31:38 -0000
@@ -46,6 +46,7 @@
#endif /* !IFNAMSIZ */
#endif /* !WIN32 */
//#include "ubi_SplayTree.h"
+#include "sf_types.h"
#include "bitop.h"
#include "ipv6_port.h"
Index: src/detect.h
===================================================================
RCS file: /usr/cvsroot/sfeng/ims/sfsnort/snort/src/detect.h,v
retrieving revision 1.16.6.1
diff -p -u -r1.16.6.1 detect.h
--- src/detect.h 11 Nov 2008 17:43:05 -0000 1.16.6.1
+++ src/detect.h 24 Dec 2008 06:31:38 -0000
@@ -28,6 +28,7 @@
#endif
//#include "snort.h"
+#include "sf_types.h"
#include "decode.h"
#include "rules.h"
#include "parser.h"
Index: src/sf_types.h
===================================================================
RCS file: /usr/cvsroot/sfeng/ims/sfsnort/snort/src/sf_types.h,v
retrieving revision 1.6
diff -p -u -r1.6 sf_types.h
--- src/sf_types.h 25 Feb 2008 19:09:46 -0000 1.6
+++ src/sf_types.h 24 Dec 2008 06:31:38 -0000
@@ -31,25 +31,64 @@
#include "stdint.h"
#include "inttypes.h"
#else
-#ifdef HAVE_INTTYPES_H
+/* Autoconf uses <sys/types.h>, <inttypes.h> and <stdint.h> as standard includes for
+ * determining if these exist so there shouldn't be any typedef conflicts with
+ * including <sys/types.h>, <inttypes.h> or <stdint.h> since these would be
+ * defined already */
+# if !defined(HAVE_UINT8_T) || !defined(HAVE_U_INT8_T)
+# if !defined(HAVE_UINT8_T) && !defined(HAVE_U_INT8_T)
+typedef unsigned char uint8_t
+typedef unsigned char u_int8_t
+# elif defined(HAVE_UINT8_T)
+typedef uint8_t u_int8_t
+# else
+typedef u_int8_t uint8_t
+# endif /* !defined(HAVE_UINT8_T) && !defined(HAVE_U_INT8_T) */
+# endif /* !defined(HAVE_UINT8_T) || !defined(HAVE_U_INT8_T) */
+# if !defined(HAVE_UINT16_T) || !defined(HAVE_U_INT16_T)
+# if !defined(HAVE_UINT16_T) && !defined(HAVE_U_INT16_T)
+typedef unsigned short uint16_t
+typedef unsigned short u_int16_t
+# elif defined(HAVE_UINT16_T)
+typedef uint16_t u_int16_t
+# else
+typedef u_int16_t uint16_t
+# endif /* !defined(HAVE_UINT16_T) && !defined(HAVE_U_INT16_T) */
+# endif /* !defined(HAVE_UINT16_T) || !defined(HAVE_U_INT16_T) */
+# if !defined(HAVE_UINT32_T) || !defined(HAVE_U_INT32_T)
+# if !defined(HAVE_UINT32_T) && !defined(HAVE_U_INT32_T)
+# ifdef AIX
+typedef unsigned long int uint32_t
+typedef unsigned long int u_int32_t
+# else
+typedef unsigned int uint32_t
+typedef unsigned int u_int32_t
+# endif /* AIX */
+# elif defined(HAVE_UINT32_T)
+typedef uint32_t u_int32_t
+# else
+typedef u_int32_t uint32_t
+# endif /* !defined(HAVE_UINT32_T) && !defined(HAVE_U_INT32_T) */
+# endif /* !defined(HAVE_UINT32_T) || !defined(HAVE_U_INT32_T) */
+# ifdef HAVE_INTTYPES_H
+/* <inttypes.h> includes <stdint.h> */
#include <inttypes.h>
-#elif HAVE_STDINT_H
+# elif HAVE_STDINT_H
#include <stdint.h>
-#else
+# else
/* Solaris - if inttypes.h is present, it should bring this in */
-#ifndef SYS_INT_TYPES_H
-#if defined(_LP64) || defined(_I32LPx)
+# ifndef SYS_INT_TYPES_H
+# if defined(_LP64) || defined(_I32LPx)
typedef long int intptr_t;
typedef unsigned long int uintptr_t;
-#else
+# else
typedef int intptr_t;
typedef unsigned int uintptr_t;
-#endif /* defined(_LP64) || defined(_I32LPx) */
-#endif /* SYS_INT_TYPES_H */
-#endif /* HAVE_INTTYPES_H elseif HAVE_STDINT_H */
+# endif /* defined(_LP64) || defined(_I32LPx) */
+# endif /* SYS_INT_TYPES_H */
+# endif /* HAVE_INTTYPES_H elseif HAVE_STDINT_H */
#endif /* WIN32 */
-
#ifndef UINT64
#ifdef ULONGIS64BIT
#define UINT64 unsigned long
Index: src/detection-plugins/sp_cvs.h
===================================================================
RCS file: /usr/cvsroot/sfeng/ims/sfsnort/snort/src/detection-plugins/sp_cvs.h,v
retrieving revision 1.6
diff -p -u -r1.6 sp_cvs.h
--- src/detection-plugins/sp_cvs.h 17 Apr 2008 13:20:50 -0000 1.6
+++ src/detection-plugins/sp_cvs.h 24 Dec 2008 06:31:38 -0000
@@ -39,6 +39,7 @@
#ifndef __SP_CVS_H__
#define __SP_CVS_H__
+#include "sf_types.h"
/* macros */
#define CVS_CONFIG_DELIMITERS " \t\n"
Index: src/detection-plugins/sp_ip_id_check.h
===================================================================
RCS file: /usr/cvsroot/sfeng/ims/sfsnort/snort/src/detection-plugins/sp_ip_id_check.h,v
retrieving revision 1.6
diff -p -u -r1.6 sp_ip_id_check.h
--- src/detection-plugins/sp_ip_id_check.h 29 Feb 2008 21:13:19 -0000 1.6
+++ src/detection-plugins/sp_ip_id_check.h 24 Dec 2008 06:31:38 -0000
@@ -22,6 +22,8 @@
#ifndef __SP_IP_ID_CHECK_H__
#define __SP_IP_ID_CHECK_H__
+#include "sf_types.h"
+
void SetupIpIdCheck(void);
#ifdef DETECTION_OPTION_TREE
u_int32_t IpIdCheckHash(void *d);
Index: src/detection-plugins/sp_respond2.c
===================================================================
RCS file: /usr/cvsroot/sfeng/ims/sfsnort/snort/src/detection-plugins/sp_respond2.c,v
retrieving revision 1.16
diff -p -u -r1.16 sp_respond2.c
--- src/detection-plugins/sp_respond2.c 23 Jun 2008 18:15:16 -0000 1.16
+++ src/detection-plugins/sp_respond2.c 24 Dec 2008 06:31:38 -0000
@@ -96,6 +96,7 @@
#include <dnet.h>
+#include "sf_types.h"
#include "decode.h"
#include "rules.h"
#include "plugbase.h"
Index: src/detection-plugins/sp_tcp_ack_check.c
===================================================================
RCS file: /usr/cvsroot/sfeng/ims/sfsnort/snort/src/detection-plugins/sp_tcp_ack_check.c,v
retrieving revision 1.9
diff -p -u -r1.9 sp_tcp_ack_check.c
--- src/detection-plugins/sp_tcp_ack_check.c 23 Jun 2008 18:15:16 -0000 1.9
+++ src/detection-plugins/sp_tcp_ack_check.c 24 Dec 2008 06:31:38 -0000
@@ -28,6 +28,7 @@
#include <stdlib.h>
#include <ctype.h>
+#include "sf_types.h"
#include "rules.h"
#include "decode.h"
#include "plugbase.h"
Index: src/dynamic-plugins/sf_engine/Makefile.am
===================================================================
RCS file: /usr/cvsroot/sfeng/ims/sfsnort/snort/src/dynamic-plugins/sf_engine/Makefile.am,v
retrieving revision 1.16
diff -p -u -r1.16 Makefile.am
--- src/dynamic-plugins/sf_engine/Makefile.am 6 Mar 2008 21:46:10 -0000 1.16
+++ src/dynamic-plugins/sf_engine/Makefile.am 24 Dec 2008 06:31:38 -0000
@@ -16,7 +16,8 @@ sfprimetable.c \
ipv6_port.h \
sf_ip.c \
sf_ip.h \
-debug.h
+debug.h \
+sf_types.h
nodist_libsf_engine_la_SOURCES = \
sfhashfcn.c \
@@ -25,7 +26,8 @@ sfprimetable.c \
ipv6_port.h \
sf_ip.c \
sf_ip.h \
-debug.h
+debug.h \
+sf_types.h
libsf_engine_la_SOURCES = \
bmh.c \
@@ -110,6 +112,9 @@ sfhashfcn.c: ../../sfutil/sfhashfcn.c
sfprimetable.c: ../../sfutil/sfprimetable.c
@src_file=$?; dst_file=$@; $(copy_files)
+sf_types.h: ../../sf_types.h
+ @src_file=$?; dst_file=$@; $(copy_files)
+
SUBDIRS = examples
clean-local:
Index: src/dynamic-plugins/sf_engine/sf_snort_packet.h
===================================================================
RCS file: /usr/cvsroot/sfeng/ims/sfsnort/snort/src/dynamic-plugins/sf_engine/sf_snort_packet.h,v
retrieving revision 1.28
diff -p -u -r1.28 sf_snort_packet.h
--- src/dynamic-plugins/sf_engine/sf_snort_packet.h 20 May 2008 20:44:27 -0000 1.28
+++ src/dynamic-plugins/sf_engine/sf_snort_packet.h 24 Dec 2008 06:31:38 -0000
@@ -42,6 +42,8 @@
#include <windows.h>
#endif
+#include "sf_types.h"
+
#define ETHER_HDR_LEN 14
typedef struct _EtherHeader
Index: src/dynamic-preprocessors/ssl/spp_ssl.c
===================================================================
RCS file: /usr/cvsroot/sfeng/ims/sfsnort/snort/src/dynamic-preprocessors/ssl/spp_ssl.c,v
retrieving revision 1.18.2.1
diff -p -u -r1.18.2.1 spp_ssl.c
--- src/dynamic-preprocessors/ssl/spp_ssl.c 12 Aug 2008 16:43:51 -0000 1.18.2.1
+++ src/dynamic-preprocessors/ssl/spp_ssl.c 24 Dec 2008 06:31:38 -0000
@@ -28,6 +28,7 @@
#include "config.h"
#endif /* HAVE_CONFIG_H */
+#include "sf_types.h"
#include "sf_snort_packet.h"
#include "sf_dynamic_preprocessor.h"
#include "sf_snort_plugin_api.h"
Index: src/output-plugins/spo_alert_arubaaction.c
===================================================================
RCS file: /usr/cvsroot/sfeng/ims/sfsnort/snort/src/output-plugins/spo_alert_arubaaction.c,v
retrieving revision 1.6
diff -p -u -r1.6 spo_alert_arubaaction.c
--- src/output-plugins/spo_alert_arubaaction.c 19 Jul 2007 18:38:59 -0000 1.6
+++ src/output-plugins/spo_alert_arubaaction.c 24 Dec 2008 06:31:38 -0000
@@ -46,6 +46,7 @@
#include "config.h"
#endif
+#include "sf_types.h"
#include "event.h"
#include "decode.h"
#include "debug.h"
Index: src/output-plugins/spo_alert_prelude.c
===================================================================
RCS file: /usr/cvsroot/sfeng/ims/sfsnort/snort/src/output-plugins/spo_alert_prelude.c,v
retrieving revision 1.18
diff -p -u -r1.18 spo_alert_prelude.c
--- src/output-plugins/spo_alert_prelude.c 3 Sep 2007 13:39:46 -0000 1.18
+++ src/output-plugins/spo_alert_prelude.c 24 Dec 2008 06:31:38 -0000
@@ -36,6 +36,7 @@
#include <libprelude/prelude.h>
+#include "sf_types.h"
#include "event.h"
#include "decode.h"
#include "plugbase.h"
Index: src/output-plugins/spo_unified2.c
===================================================================
RCS file: /usr/cvsroot/sfeng/ims/sfsnort/snort/src/output-plugins/spo_unified2.c,v
retrieving revision 1.29
diff -p -u -r1.29 spo_unified2.c
--- src/output-plugins/spo_unified2.c 22 May 2008 18:32:31 -0000 1.29
+++ src/output-plugins/spo_unified2.c 24 Dec 2008 06:31:38 -0000
@@ -38,6 +38,7 @@
#include <errno.h>
#include <time.h>
+#include "sf_types.h"
#include "decode.h"
#include "rules.h"
#include "util.h"
Index: src/preprocessors/snort_httpinspect.c
===================================================================
RCS file: /usr/cvsroot/sfeng/ims/sfsnort/snort/src/preprocessors/snort_httpinspect.c,v
retrieving revision 1.82
diff -p -u -r1.82 snort_httpinspect.c
--- src/preprocessors/snort_httpinspect.c 21 May 2008 15:24:14 -0000 1.82
+++ src/preprocessors/snort_httpinspect.c 24 Dec 2008 06:31:39 -0000
@@ -58,6 +58,7 @@
#include <arpa/inet.h>
#endif
+#include "sf_types.h"
#include "snort.h"
#include "detect.h"
#include "decode.h"
Index: src/preprocessors/spp_rpc_decode.c
===================================================================
RCS file: /usr/cvsroot/sfeng/ims/sfsnort/snort/src/preprocessors/spp_rpc_decode.c,v
retrieving revision 1.20
diff -p -u -r1.20 spp_rpc_decode.c
--- src/preprocessors/spp_rpc_decode.c 16 Jul 2008 15:17:54 -0000 1.20
+++ src/preprocessors/spp_rpc_decode.c 24 Dec 2008 06:31:39 -0000
@@ -55,6 +55,7 @@
#include <strings.h>
#endif
+#include "sf_types.h"
#include "decode.h"
#include "plugbase.h"
#include "parser.h"
Index: src/preprocessors/spp_stream4.c
===================================================================
RCS file: /usr/cvsroot/sfeng/ims/sfsnort/snort/src/preprocessors/Attic/spp_stream4.c,v
retrieving revision 1.207.6.1
diff -p -u -r1.207.6.1 spp_stream4.c
--- src/preprocessors/spp_stream4.c 5 Sep 2008 17:55:14 -0000 1.207.6.1
+++ src/preprocessors/spp_stream4.c 24 Dec 2008 06:31:40 -0000
@@ -97,6 +97,7 @@
#include <strings.h>
#endif
+#include "sf_types.h"
#include "bounds.h"
#include "decode.h"
#include "event.h"
------------------------------------------------------------------------------
_______________________________________________ Snort-users mailing list Snort-users () lists sourceforge net Go to this URL to change user options or unsubscribe: https://lists.sourceforge.net/lists/listinfo/snort-users Snort-users list archive: http://www.geocrawler.com/redir-sf.php3?list=snort-users
Current thread:
- Snort on Mac OS X 10.2.8: Which version of Snort can I use? Ian Masters (Dec 17)
- Re: Snort on Mac OS X 10.2.8: Which version of Snort can I use? Nerijus Krukauskas (Dec 18)
- Re: Snort on Mac OS X 10.2.8: Which version of Snort can I use? Ian Masters (Dec 22)
- Re: Snort on Mac OS X 10.2.8: Which version of Snort can I use? Todd Wease (Dec 23)
- Message not available
- Re: Snort on Mac OS X 10.2.8: Which version of Snort can I use? Ian Masters (Dec 23)
- Re: Snort on Mac OS X 10.2.8: Which version of Snort can I use? Todd Wease (Dec 23)
- Re: Snort on Mac OS X 10.2.8: Which version of Snort can I use? Ian Masters (Dec 24)
- Re: Snort on Mac OS X 10.2.8: Which version of Snort can I use? Todd Wease (Dec 24)
- Re: Snort on Mac OS X 10.2.8: Which version of Snort can I use? Ian Masters (Dec 22)
- Re: Snort on Mac OS X 10.2.8: Which version of Snort can I use? Nerijus Krukauskas (Dec 18)
- Message not available
- Message not available
- Re: Snort on Mac OS X 10.2.8: Which version of Snort can I use? Ian Masters (Dec 22)
