aboutsummaryrefslogtreecommitdiff
path: root/package/aircrack-ng/0004-fix-musl-build.patch
blob: cc093d38df094a0647b15d14dc2d611aff8fd77e (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
From da6e87670ad4639371da056f9e36201a9236dfa2 Mon Sep 17 00:00:00 2001
From: Romain Naour <romain.naour@openwide.fr>
Date: Wed, 29 Jul 2015 19:38:46 +0200
Subject: [PATCH] fix musl build

aircrack-ng doesn't build with a musl toolchain due to
cdefs.h internal glibc header being used in internal
ethernet.h [1].

[1] http://wiki.musl-libc.org/wiki/FAQ

Signed-off-by: Romain Naour <romain.naour@openwide.fr>
---
 src/include/ethernet.h | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/src/include/ethernet.h b/src/include/ethernet.h
index 72d5e81..e9d9236 100644
--- a/src/include/ethernet.h
+++ b/src/include/ethernet.h
@@ -389,18 +389,20 @@ void	ether_vlan_mtap(struct bpf_if *, struct mbuf *,
 
 #else /* _KERNEL */
 
-#include <sys/cdefs.h>
-
 /*
  * Ethernet address conversion/parsing routines.
  */
-__BEGIN_DECLS
-struct	ether_addr *ether_aton(const char *);
-int	ether_hostton(const char *, struct ether_addr *);
-int	ether_line(const char *, struct ether_addr *, char *);
-char 	*ether_ntoa(const struct ether_addr *);
-int	ether_ntohost(char *, const struct ether_addr *);
-__END_DECLS
+#ifdef __cplusplus
+extern "C" {
+#endif
+	struct	ether_addr *ether_aton(const char *);
+	int	ether_hostton(const char *, struct ether_addr *);
+	int	ether_line(const char *, struct ether_addr *, char *);
+	char 	*ether_ntoa(const struct ether_addr *);
+	int	ether_ntohost(char *, const struct ether_addr *);
+#ifdef __cplusplus
+}
+#endif
 
 #endif /* !_KERNEL */
 
-- 
2.4.3