summaryrefslogtreecommitdiffstats
path: root/net-misc/dibbler/files/0001-musl-compatibility.patch
blob: cbdba627e48a411e73859c2a86f759428d8c291f (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
From fb2e18a2c64a6870c018b101ddb8c4445dea2d81 Mon Sep 17 00:00:00 2001
From: root <root@scylla.nibylandia>
Date: Thu, 11 Jun 2015 18:10:51 +0200
Subject: [PATCH] musl compatibility

---
 Misc/Portable.h                        | 4 ++++
 Port-linux/ethtool-local.h             | 6 +++---
 Port-linux/lowlevel-linux-link-state.c | 4 +++-
 Port-linux/utils.h                     | 5 +++++
 4 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/Misc/Portable.h b/Misc/Portable.h
index 51415cc..b974eaa 100644
--- a/Misc/Portable.h
+++ b/Misc/Portable.h
@@ -29,6 +29,10 @@
 #include <arpa/inet.h>
 #endif
 
+#if defined(LINUX)
+# include <sys/select.h>
+#endif
+
 #include <stdint.h>
 #include <unistd.h>
 
diff --git a/Port-linux/ethtool-local.h b/Port-linux/ethtool-local.h
index 2940090..555f06b 100644
--- a/Port-linux/ethtool-local.h
+++ b/Port-linux/ethtool-local.h
@@ -22,9 +22,9 @@
  */
 
 typedef unsigned long long u64;
-typedef __uint32_t u32;        
-typedef __uint16_t u16;        
-typedef __uint8_t u8;          
+typedef uint32_t u32;        
+typedef uint16_t u16;        
+typedef uint8_t u8;          
 
 #include "ethtool-kernel.h"
 
diff --git a/Port-linux/lowlevel-linux-link-state.c b/Port-linux/lowlevel-linux-link-state.c
index 7ca9f6b..76293ea 100644
--- a/Port-linux/lowlevel-linux-link-state.c
+++ b/Port-linux/lowlevel-linux-link-state.c
@@ -18,7 +18,9 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
-#include <bits/sigthread.h>
+#if defined(__GLIBC__)
+# include <bits/sigthread.h>
+#endif
 #include "Portable.h"
 #include "interface.h"
 
diff --git a/Port-linux/utils.h b/Port-linux/utils.h
index e40d95f..579dffb 100644
--- a/Port-linux/utils.h
+++ b/Port-linux/utils.h
@@ -1,9 +1,14 @@
 #ifndef __UTILS_H__
 #define __UTILS_H__ 1
 
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+
 #include <asm/types.h>
 //#include <resolv.h>
 #include <linux/types.h>
+#include <sys/types.h>
 
 #include "libnetlink.h"
 #include "ll_map.h"
-- 
2.4.3