diff options
Diffstat (limited to 'meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-Define-in_-structs-for-non-glibc-system-libs.patch')
-rw-r--r-- | meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-Define-in_-structs-for-non-glibc-system-libs.patch | 60 |
1 files changed, 31 insertions, 29 deletions
diff --git a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-Define-in_-structs-for-non-glibc-system-libs.patch b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-Define-in_-structs-for-non-glibc-system-libs.patch index 8d1ec69ae9..e7a0cce837 100644 --- a/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-Define-in_-structs-for-non-glibc-system-libs.patch +++ b/meta-initramfs/recipes-devtools/klibc/klibc-2.0.4/0001-Define-in_-structs-for-non-glibc-system-libs.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From f414dea1316a48aba3e8e293201ebd51652d3ef4 Mon Sep 17 00:00:00 2001 | 1 | From 57e3a60b23891905733bfea7a1cb78c2377cc524 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Sun, 9 Jul 2017 15:17:29 -0700 | 3 | Date: Sun, 9 Jul 2017 15:17:29 -0700 |
4 | Subject: [PATCH] Define in_* structs for non-glibc system libs | 4 | Subject: [PATCH] Define in_* structs for non-glibc system libs |
@@ -10,14 +10,38 @@ glibc in mind, and does not provide adequate guards for musl | |||
10 | to infer that these structs should be defined in linux/in.h | 10 | to infer that these structs should be defined in linux/in.h |
11 | 11 | ||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
13 | |||
13 | --- | 14 | --- |
14 | usr/include/netinet/in.h | 33 +++++++++++++++++++++++++++++++++ | 15 | usr/include/net/if.h | 11 +++++++++++ |
15 | 1 file changed, 33 insertions(+) | 16 | usr/include/netinet/in.h | 36 ++++++++++++++++++++++++++++++++++++ |
17 | 2 files changed, 47 insertions(+) | ||
16 | 18 | ||
17 | Index: git/usr/include/netinet/in.h | 19 | diff --git a/usr/include/net/if.h b/usr/include/net/if.h |
18 | =================================================================== | 20 | index 116a176..6246b12 100644 |
19 | --- git.orig/usr/include/netinet/in.h | 21 | --- a/usr/include/net/if.h |
20 | +++ git/usr/include/netinet/in.h | 22 | +++ b/usr/include/net/if.h |
23 | @@ -1,6 +1,17 @@ | ||
24 | #ifndef _NET_IF_H | ||
25 | #define _NET_IF_H | ||
26 | |||
27 | +#ifndef __GLIBC__ | ||
28 | +#include <linux/libc-compat.h> | ||
29 | +#undef __UAPI_DEF_IF_IFREQ | ||
30 | +#define __UAPI_DEF_IF_IFREQ 1 | ||
31 | +#undef __UAPI_DEF_IF_IFNAMSIZ | ||
32 | +#define __UAPI_DEF_IF_IFNAMSIZ 1 | ||
33 | +#undef __UAPI_DEF_IF_IFMAP | ||
34 | +#define __UAPI_DEF_IF_IFMAP 1 | ||
35 | +#undef __UAPI_DEF_IF_NET_DEVICE_FLAGS | ||
36 | +#define __UAPI_DEF_IF_NET_DEVICE_FLAGS 1 | ||
37 | +#endif | ||
38 | #include <sys/socket.h> | ||
39 | #include <sys/types.h> | ||
40 | #include <linux/if.h> | ||
41 | diff --git a/usr/include/netinet/in.h b/usr/include/netinet/in.h | ||
42 | index 2952bb2..0c95bc9 100644 | ||
43 | --- a/usr/include/netinet/in.h | ||
44 | +++ b/usr/include/netinet/in.h | ||
21 | @@ -5,6 +5,42 @@ | 45 | @@ -5,6 +5,42 @@ |
22 | #ifndef _NETINET_IN_H | 46 | #ifndef _NETINET_IN_H |
23 | #define _NETINET_IN_H | 47 | #define _NETINET_IN_H |
@@ -61,25 +85,3 @@ Index: git/usr/include/netinet/in.h | |||
61 | #include <klibc/extern.h> | 85 | #include <klibc/extern.h> |
62 | #include <stdint.h> | 86 | #include <stdint.h> |
63 | #include <endian.h> /* Must be included *before* <linux/in.h> */ | 87 | #include <endian.h> /* Must be included *before* <linux/in.h> */ |
64 | Index: git/usr/include/net/if.h | ||
65 | =================================================================== | ||
66 | --- git.orig/usr/include/net/if.h | ||
67 | +++ git/usr/include/net/if.h | ||
68 | @@ -1,6 +1,17 @@ | ||
69 | #ifndef _NET_IF_H | ||
70 | #define _NET_IF_H | ||
71 | |||
72 | +#ifndef __GLIBC__ | ||
73 | +#include <linux/libc-compat.h> | ||
74 | +#undef __UAPI_DEF_IF_IFREQ | ||
75 | +#define __UAPI_DEF_IF_IFREQ 1 | ||
76 | +#undef __UAPI_DEF_IF_IFNAMSIZ | ||
77 | +#define __UAPI_DEF_IF_IFNAMSIZ 1 | ||
78 | +#undef __UAPI_DEF_IF_IFMAP | ||
79 | +#define __UAPI_DEF_IF_IFMAP 1 | ||
80 | +#undef __UAPI_DEF_IF_NET_DEVICE_FLAGS | ||
81 | +#define __UAPI_DEF_IF_NET_DEVICE_FLAGS 1 | ||
82 | +#endif | ||
83 | #include <sys/socket.h> | ||
84 | #include <sys/types.h> | ||
85 | #include <linux/if.h> | ||