On Sat, Feb 20, 2021 at 06:52:15PM +0100, Bjorn Ketelaars wrote: > Fix taken from FreeBSD.
This pattern typedef enum + extern doesn't make all that much sense to me, as the externed variables don't actually exist. How about this? Seems simpler and should be functionally equivalent. Index: Makefile =================================================================== RCS file: /cvs/ports/net/honeyd/Makefile,v retrieving revision 1.43 diff -u -p -r1.43 Makefile --- Makefile 12 Jul 2019 20:48:27 -0000 1.43 +++ Makefile 20 Feb 2021 20:38:02 -0000 @@ -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/ Index: patches/patch-personality_c =================================================================== RCS file: patches/patch-personality_c diff -N patches/patch-personality_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-personality_c 21 Feb 2021 09:09:54 -0000 @@ -0,0 +1,17 @@ +$OpenBSD$ + +Fix -fno-common build error. + +Index: personality.c +--- personality.c.orig ++++ personality.c +@@ -65,6 +65,9 @@ + #include "template.h" + #include "debug.h" + ++struct perstree personalities; ++struct xp_fprint_tree xp_fprints; ++ + /* ET - Moved SPLAY_HEAD to personality.h so xprobe_assoc.c could use it. */ + int npersons; + Index: patches/patch-personality_h =================================================================== RCS file: patches/patch-personality_h diff -N patches/patch-personality_h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-personality_h 21 Feb 2021 09:10:03 -0000 @@ -0,0 +1,27 @@ +$OpenBSD$ + +Fix -fno-common build error. + +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; ++SPLAY_HEAD(perstree, personality); ++extern struct perstree 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; ++SPLAY_HEAD(xp_fprint_tree, xp_fingerprint); ++extern struct xp_fprint_tree xp_fprints; + static int + xp_fprint_compare(struct xp_fingerprint *a, struct xp_fingerprint *b) + { Index: patches/patch-stats_h =================================================================== RCS file: patches/patch-stats_h diff -N patches/patch-stats_h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-stats_h 21 Feb 2021 09:10:10 -0000 @@ -0,0 +1,25 @@ +$OpenBSD$ + +Fix -fno-common build error. + +Index: stats.h +--- stats.h.orig ++++ stats.h +@@ -91,7 +91,7 @@ struct stats { + + enum { + M_COUNTER, M_TV_START, M_TV_END, M_RECORD, M_MAX +-} measurement_tags; ++}; + + struct measurement { + uint32_t counter; +@@ -105,7 +105,7 @@ struct measurement { + + enum { + SIG_NAME, SIG_DIGEST, SIG_DATA, SIG_COMPRESSED_DATA, SIG_MAX +-} signature_tags; ++}; + + struct signature { + char *name; Index: patches/patch-tagging_h =================================================================== RCS file: patches/patch-tagging_h diff -N patches/patch-tagging_h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-tagging_h 21 Feb 2021 09:10:15 -0000 @@ -0,0 +1,25 @@ +$OpenBSD$ + +Fix -fno-common build error. + +Index: tagging.h +--- tagging.h.orig ++++ tagging.h +@@ -48,7 +48,7 @@ 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; ++}; + + #define RECORD_STATE_NEW 0x01 + +@@ -71,7 +71,7 @@ struct record { + + enum { + ADDR_TYPE, ADDR_BITS, ADDR_ADDR, ADDR_MAX_TAGS +-} address_tags; ++}; + + void record_marshal(struct evbuffer *, struct record *); + Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/net/honeyd/pkg/PLIST,v retrieving revision 1.9 diff -u -p -r1.9 PLIST --- pkg/PLIST 21 Apr 2010 23:42:18 -0000 1.9 +++ pkg/PLIST 20 Feb 2021 20:38:02 -0000 @@ -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/