summaryrefslogtreecommitdiff
path: root/net/libnids/patches/patch-src_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/libnids/patches/patch-src_util.h')
-rw-r--r--net/libnids/patches/patch-src_util.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/net/libnids/patches/patch-src_util.h b/net/libnids/patches/patch-src_util.h
new file mode 100644
index 00000000000..7cc83111d7b
--- /dev/null
+++ b/net/libnids/patches/patch-src_util.h
@@ -0,0 +1,26 @@
+$NetBSD: patch-src_util.h,v 1.1 2012/04/17 17:45:36 joerg Exp $
+
+--- src/util.h.orig 2012-04-16 22:20:32.000000000 +0000
++++ src/util.h
+@@ -23,9 +23,19 @@ struct lurker_node {
+
+ void nids_no_mem(char *);
+ char *test_malloc(int);
+-inline int before(u_int seq1, u_int seq2);
+-inline int after(u_int seq1, u_int seq2);
+ void register_callback(struct proc_node **procs, void (*x));
+ void unregister_callback(struct proc_node **procs, void (*x));
+
++static inline int
++before(u_int seq1, u_int seq2)
++{
++ return ((int)(seq1 - seq2) < 0);
++}
++
++static inline int
++after(u_int seq1, u_int seq2)
++{
++ return ((int)(seq2 - seq1) < 0);
++}
++
+ #endif /* _NIDS_UTIL_H */