[Snort-devel] [PATCH] Missing stdint.h on OpenBSD, HP-UX

Jasper van Veghel vanveghel at ...2311...
Tue Dec 30 07:59:09 EST 2003


Trying to install Snort on my OpenBSD (3.1) box I came accross
some compiler errors on a missing stdint.h. I've written a little
patch that adds an #ifdef _GLIBCXX_HAVE_STDINT_H around every
instance of stdint.h, which seems to fix the problem.

Regards,

Jasper van Veghel
-------------- next part --------------
--- src/sfutil/util_net.h.old	Sat Dec 27 13:47:33 2003
+++ src/sfutil/util_net.h	Sat Dec 27 13:44:39 2003
@@ -11,7 +11,9 @@
 #ifndef _UTIL_NET_H
 #define _UTIL_NET_H
 
+#ifdef _GLIBCXX_HAVE_STDINT_H
 #include <stdint.h>
+#endif
 
 char *inet_ntoax(uint32_t ip);
 char * mktcpflag_str(int flags);
--- src/event_wrapper.h.old	Sat Dec 27 13:48:57 2003
+++ src/event_wrapper.h	Sat Dec 27 13:49:15 2003
@@ -1,7 +1,9 @@
 #ifndef _EVENT_WRAPPER_H
 #define _EVENT_WRAPPER_H
 
+#ifdef _GLIBCXX_HAVE_STDINT_H
 #include <stdint.h>
+#endif
 
 #include "log.h"
 #include "detect.h"
--- src/preprocessors/flow/flow.h.old	Sat Dec 27 13:56:28 2003
+++ src/preprocessors/flow/flow.h	Sat Dec 27 13:56:43 2003
@@ -1,7 +1,9 @@
 #ifndef _FLOW_H
 #define _FLOW_H
 
+#ifdef _GLIBCXX_HAVE_STDINT_H
 #include <stdint.h>
+#endif
 
 #include "flow_error.h"
 #include "util_math.h"
--- src/preprocessors/flow/flow_stat.h.old	Sat Dec 27 13:56:52 2003
+++ src/preprocessors/flow/flow_stat.h	Sat Dec 27 13:57:11 2003
@@ -2,7 +2,9 @@
 #define _FLOW_STAT_H
 
 #include <stdio.h>
+#ifdef _GLIBCXX_HAVE_STDINT_H
 #include <stdint.h>
+#endif
 #include <time.h>
 
 #include "flow.h"
--- src/preprocessors/flow/portscan/flowps.h.old	Sat Dec 27 13:57:37 2003
+++ src/preprocessors/flow/portscan/flowps.h	Sat Dec 27 13:57:51 2003
@@ -6,7 +6,9 @@
 #endif
 
 #include <time.h>
+#ifdef _GLIBCXX_HAVE_STDINT_H
 #include <stdint.h>
+#endif
 
 #include "flow.h"
 #include "unique_tracker.h"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://lists.snort.org/pipermail/snort-devel/attachments/20031230/8339ab5e/attachment.sig>


More information about the Snort-devel mailing list