Tweaks for OpenBSD support.

- Add note about top-level Makefile possibly lacking OpenBSD support.
- Extend config.h with missing/different preprocessor definitions
This commit is contained in:
Jon Siwek 2012-01-06 11:39:38 -06:00
parent e5b3d318a6
commit d661ccfc8e
3 changed files with 17 additions and 2 deletions

View file

@ -48,6 +48,12 @@ called ``build/``, using default build options. It then installs all
required files into ``/usr/local/bro``, including the Bro binary in required files into ``/usr/local/bro``, including the Bro binary in
``/usr/local/bro/bin/bro``. ``/usr/local/bro/bin/bro``.
Note that the top-level Makefile may not work with OpenBSD's default
make program, in which case you can either install the ``gmake``
package and use it instead or first change into the ``build/``
directory before doing either ``make`` or ``make install`` such that
the CMake-generated Makefile's are used directly.
You can specify a different installation directory with:: You can specify a different installation directory with::
./configure --prefix=<dir> ./configure --prefix=<dir>

View file

@ -32,8 +32,8 @@
/* Define if you have the <net/ethernet.h> header file. */ /* Define if you have the <net/ethernet.h> header file. */
#cmakedefine HAVE_NET_ETHERNET_H #cmakedefine HAVE_NET_ETHERNET_H
/* We are on a OpenBSD system */ /* Define if you have the <net/ethertypes.h> header file. */
#cmakedefine HAVE_OPENBSD #cmakedefine HAVE_NET_ETHERTYPES_H
/* have os-proto.h */ /* have os-proto.h */
#cmakedefine HAVE_OS_PROTO_H #cmakedefine HAVE_OS_PROTO_H
@ -145,3 +145,10 @@
/* Define u_int8_t */ /* Define u_int8_t */
#cmakedefine u_int8_t @u_int8_t@ #cmakedefine u_int8_t @u_int8_t@
/* OpenBSD's bpf.h may not declare this data link type, but it's supposed to be
used consistently for the same purpose on all platforms. */
#cmakedefine HAVE_DLT_PPP_SERIAL
#ifndef HAVE_DLT_PPP_SERIAL
#define DLT_PPP_SERIAL @DLT_PPP_SERIAL@
#endif

View file

@ -15,6 +15,8 @@
#include <sys/ethernet.h> #include <sys/ethernet.h>
#elif defined(HAVE_NETINET_IF_ETHER_H) #elif defined(HAVE_NETINET_IF_ETHER_H)
#include <netinet/if_ether.h> #include <netinet/if_ether.h>
#elif defined(HAVE_NET_ETHERTYPES_H)
#include <net/ethertypes.h>
#endif #endif
#ifndef arp_pkthdr #ifndef arp_pkthdr