Compile Bro in OpenBSD 5.2

Hi all,

I’m trying to compile Bro in OpenBSD 5.2. Unfortunately, several errors stop me. The following are logs. Anyone can give some quick advise? I appreciate your comments.

Thanks,
Shoufu

<sys/types.h> is supposed to be included before <sys/socket.h>, and I think OpenBSD is being sensitive about places that don't do that in Bro's code. Could you try the patch below and let me know if it helps?

diff --git a/src/bro_inet_ntop.h b/src/bro_inet_ntop.h
index 00326b0..c018403 100644
--- a/src/bro_inet_ntop.h
+++ b/src/bro_inet_ntop.h
@@ -5,6 +5,7 @@
  extern "C" {
  #endif

+#include <sys/types.h>
  #include <sys/socket.h>

  const char *
diff --git a/src/threading/SerialTypes.h b/src/threading/SerialTypes.h
index 60aee24..f4f0bc0 100644
--- a/src/threading/SerialTypes.h
+++ b/src/threading/SerialTypes.h
@@ -2,6 +2,7 @@
  #ifndef THREADING_SERIALIZATIONTYPES_H
  #define THREADING_SERIALIZATIONTYPES_H

+#include <sys/types.h>
  #include <sys/socket.h>
  #include <netinet/in.h>
  #include <arpa/inet.h>

Yes, it works! Thank you, Jon!

Thanks,
Shoufu