Fix taken from FreeBSD.

OK?


diff --git Makefile Makefile
index 24ebef0ddd7..bed32c9ad7d 100644
--- Makefile
+++ Makefile
@@ -2,7 +2,7 @@
 
 COMMENT=       utility to create virtual hosts on a network
 DISTNAME=      honeyd-1.5c
-REVISION=      12
+REVISION=      13
 CATEGORIES=    net
 MASTER_SITES=  http://www.citi.umich.edu/u/provos/honeyd/ \
                http://niels.xtdnet.nl/honeyd/
diff --git patches/patch-personality_c patches/patch-personality_c
new file mode 100644
index 00000000000..e1d658643d0
--- /dev/null
+++ patches/patch-personality_c
@@ -0,0 +1,18 @@
+$OpenBSD$
+
+Fix -fno-common build error. Taken from
+https://svnweb.freebsd.org/ports?view=revision&revision=549600
+
+Index: personality.c
+--- personality.c.orig
++++ personality.c
+@@ -65,6 +65,9 @@
+ #include "template.h"
+ #include "debug.h"
+ 
++personalities_t personalities;
++xp_fprints_t xp_fprints;
++
+ /* ET - Moved SPLAY_HEAD to personality.h so xprobe_assoc.c could use it. */
+ int npersons;
+ 
diff --git patches/patch-personality_h patches/patch-personality_h
new file mode 100644
index 00000000000..cc3c32e2273
--- /dev/null
+++ patches/patch-personality_h
@@ -0,0 +1,28 @@
+$OpenBSD$
+
+Fix -fno-common build error. Taken from
+https://svnweb.freebsd.org/ports?view=revision&revision=549600
+
+Index: personality.h
+--- personality.h.orig
++++ personality.h
+@@ -179,7 +179,8 @@ void xprobe_personality_init(void);
+ void print_perstree(void);
+ 
+ /* Splay stuff here so other modules can use it */
+-SPLAY_HEAD(perstree, personality) personalities;
++typedef SPLAY_HEAD(perstree, personality) personalities_t;
++extern personalities_t personalities;
+ static int
+ perscompare(struct personality *a, struct personality *b)
+ {
+@@ -187,7 +188,8 @@ perscompare(struct personality *a, struct personality 
+ }
+ SPLAY_PROTOTYPE(perstree, personality, node, perscompare);
+ 
+-SPLAY_HEAD(xp_fprint_tree, xp_fingerprint) xp_fprints;
++typedef SPLAY_HEAD(xp_fprint_tree, xp_fingerprint) xp_fprints_t;
++extern xp_fprints_t xp_fprints;
+ static int 
+ xp_fprint_compare(struct xp_fingerprint *a, struct xp_fingerprint *b)
+ {
diff --git patches/patch-stats_h patches/patch-stats_h
new file mode 100644
index 00000000000..d869d69e102
--- /dev/null
+++ patches/patch-stats_h
@@ -0,0 +1,37 @@
+$OpenBSD$
+
+Fix -fno-common build error. Taken from
+https://svnweb.freebsd.org/ports?view=revision&revision=549600
+
+Index: stats.h
+--- stats.h.orig
++++ stats.h
+@@ -89,10 +89,12 @@ struct stats {
+               reserved:4;
+ };
+ 
+-enum {
++typedef enum {
+       M_COUNTER, M_TV_START, M_TV_END, M_RECORD, M_MAX
+-} measurement_tags;
++} measurement_tags_t;
+ 
++extern measurement_tags_t measurement_tags;
++
+ struct measurement {
+       uint32_t counter;
+       struct timeval tv_start;
+@@ -103,9 +105,11 @@ struct measurement {
+ #define SHA1_DIGESTSIZE       20
+ #endif
+ 
+-enum {
++typedef enum {
+       SIG_NAME, SIG_DIGEST, SIG_DATA, SIG_COMPRESSED_DATA, SIG_MAX
+-} signature_tags;
++} signature_tags_t;
++
++extern signature_tags_t signature_tags;
+ 
+ struct signature {
+       char *name;
diff --git patches/patch-tagging_h patches/patch-tagging_h
new file mode 100644
index 00000000000..8593f9cbbd9
--- /dev/null
+++ patches/patch-tagging_h
@@ -0,0 +1,39 @@
+$OpenBSD$
+
+Fix -fno-common build error. Taken from
+https://svnweb.freebsd.org/ports?view=revision&revision=549600
+
+Index: tagging.h
+--- tagging.h.orig
++++ tagging.h
+@@ -44,12 +44,14 @@ struct hash {
+       u_char digest[SHINGLE_SIZE];
+ };
+ 
+-enum {
++typedef enum {
+       REC_TV_START, REC_TV_END, REC_SRC, REC_DST, REC_SRC_PORT, REC_DST_PORT,
+       REC_PROTO, REC_STATE, REC_OS_FP, REC_HASH, REC_BYTES, REC_FLAGS,
+       REC_MAX_TAGS
+-} record_tags;
++} record_tags_t;
+ 
++extern record_tags_t record_tags;
++
+ #define RECORD_STATE_NEW      0x01
+ 
+ struct record {
+@@ -69,9 +71,11 @@ struct record {
+       TAILQ_HEAD(hashq, hash) hashes; /* optional */
+ };
+ 
+-enum {
++typedef enum {
+       ADDR_TYPE, ADDR_BITS, ADDR_ADDR, ADDR_MAX_TAGS
+-} address_tags;
++} address_tags_t;
++
++extern address_tags_t address_tags;
+ 
+ void record_marshal(struct evbuffer *, struct record *);
+ 
diff --git pkg/PLIST pkg/PLIST
index 44ae4e01d0f..bb1e3e5de11 100644
--- pkg/PLIST
+++ pkg/PLIST
@@ -11,7 +11,7 @@ include/honeyd/hooks.h
 include/honeyd/plugins.h
 include/honeyd/plugins_config.h
 lib/honeyd/
-lib/honeyd/libhoneyd.so
+@so lib/honeyd/libhoneyd.so
 @man man/man1/honeydctl.1
 @man man/man8/honeyd.8
 share/honeyd/

Reply via email to