summaryrefslogtreecommitdiff
path: root/net-misc/ip-sentinel/files/ip-sentinel-0.12-fixed-dietlibc-compat-stuff.patch
blob: 051956366fe0b61e3e2b56f5d46fee637e48d476 (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
From ecf89e635de8778ebbf901279f7672e2c15e4ecb Mon Sep 17 00:00:00 2001
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Date: Fri, 1 Aug 2008 09:20:46 +0200
Subject: fixed dietlibc compatibility stuff

removed lot of compatibility stuff which was needed for ancient
dietlibc version.
---
 src/compat.h   | 31 ++-----------------------------
 src/util.h     |  2 +-
 src/wrappers.h |  1 +
 3 files changed, 4 insertions(+), 30 deletions(-)

diff --git a/src/compat.h b/src/compat.h
index c180185..c6fb409 100644
--- a/src/compat.h
+++ b/src/compat.h
@@ -19,22 +19,8 @@
 #ifndef H_ENSC_IPSENTINEL_SRC_COMPAT_H
 #define H_ENSC_IPSENTINEL_SRC_COMPAT_H
 
-#if defined(__dietlibc__) && !defined(ENSC_DIETLIBC_C99) && defined(__STRICT_ANSI__) && defined(__STDC_VERSION__)
-  // fixed in 0.25+
-#  include <sys/cdefs.h>
-#  undef inline
-
-#  undef  __STRICT_ANSI__
-#  include <stdint.h>
-#  define __STRICT_ANSI__
-#endif
-
 #ifdef __dietlibc__
-  // fixed in 0.27+
-#  define ethhdr		ethhdrX
-#  include <net/ethernet.h>
-#  undef  ethhdr
-
+struct ether_addr;
 #  ifndef HAVE_DIET_ETHER_NTOA
 char *			ether_ntoa(struct ether_addr const *addr);
 #  endif
@@ -44,22 +30,9 @@ struct ether_addr *	ether_aton_r(const char *asc, struct ether_addr *addr);
 #  endif
 #endif
 
-
-#ifndef __dietlibc__
-#  include <stropts.h>
-#else
-#  include <sys/ioctl.h>
-#endif
-
-#ifdef __dietlibc__
-#  define sin	XsinX
-#endif
-#include <netinet/in.h>
-#undef sin
-
-
 #ifdef __dietlibc__
 #include <net/if_arp.h>
+#include <net/ethernet.h>
 #include <stdint.h>
 
 struct  ether_arp {
diff --git a/src/util.h b/src/util.h
index 20381e3..adfe3a6 100644
--- a/src/util.h
+++ b/src/util.h
@@ -25,7 +25,6 @@
 #include <unistd.h>
 #include <net/ethernet.h>
 
-
   /*@-namechecks@*/
 #ifndef __cplusplus
 #  define cAsT_(X)              (X))
@@ -77,6 +76,7 @@ xstrcat(char **dst, size_t *cnt, char const *src)
   xstrcatn(dst, cnt, src, strlen(src));
 }
 
+struct in_addr;
 void writeUInt(int fd, unsigned int nr);
 void writeMsgTimestamp(int fd);
 void writeIP(int fd, struct in_addr);
diff --git a/src/wrappers.h b/src/wrappers.h
index e1be0ad..5548702 100644
--- a/src/wrappers.h
+++ b/src/wrappers.h
@@ -24,6 +24,7 @@
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/stat.h>
+#include <sys/ioctl.h>
 #include <fcntl.h>
 #include <pwd.h>
 #include <errno.h>
-- 
cgit v1.2.1