summaryrefslogtreecommitdiff
path: root/net/ettercap/patches/patch-ab
blob: b1ed3b1a2d65019beb32387e0b47ae921d93cd2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
$NetBSD: patch-ab,v 1.1 2002/11/06 19:13:29 atatat Exp $

It seems that when kqueue was merged to the trunk, sys/select.h
was altered to include sys/queue.h, which supplies a pile of macros
and defines _SYS_QUEUE_H_.  Prior to this change, ettercap was able
to pull in its own ec_queue.h file to define these macros (and the
missing ones below) and also define _SYS_QUEUE_H_.  The two macros
listed below are not in our definition of the macros, so we define
them manually later, if they're not defined by the include files.

--- src/include/ec_main.h.orig	Mon Nov  4 14:45:27 2002
+++ src/include/ec_main.h
@@ -44,6 +44,19 @@
 
 #include "ec_stdint.h"
 
+#ifndef LIST_REPLACE
+#define LIST_REPLACE(elm, elm2, field) do {				\
+	if (((elm2)->field.le_next = (elm)->field.le_next) != NULL)	\
+		(elm2)->field.le_next->field.le_prev =			\
+		    &(elm2)->field.le_next;				\
+	(elm2)->field.le_prev = (elm)->field.le_prev;			\
+	*(elm2)->field.le_prev = (elm2);				\
+} while (0)
+#endif /* !defined(LIST_REPLACE) */
+
+#ifndef LIST_END
+#define LIST_END(head) NULL
+#endif /* !defined(LIST_END) */
 
 #ifdef HAVE_PDCURSES
    #undef MOUSE_MOVED