summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/ltp/ltp/0010-replace-__BEGIN_DECLS-and-__END_DECLS.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/ltp/ltp/0010-replace-__BEGIN_DECLS-and-__END_DECLS.patch')
-rw-r--r--meta/recipes-extended/ltp/ltp/0010-replace-__BEGIN_DECLS-and-__END_DECLS.patch75
1 files changed, 0 insertions, 75 deletions
diff --git a/meta/recipes-extended/ltp/ltp/0010-replace-__BEGIN_DECLS-and-__END_DECLS.patch b/meta/recipes-extended/ltp/ltp/0010-replace-__BEGIN_DECLS-and-__END_DECLS.patch
deleted file mode 100644
index b9fce880fa..0000000000
--- a/meta/recipes-extended/ltp/ltp/0010-replace-__BEGIN_DECLS-and-__END_DECLS.patch
+++ /dev/null
@@ -1,75 +0,0 @@
1From 0130f4146ced320aadb01b22e36b13d269a8ebba Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 7 Jan 2016 19:48:14 +0000
4Subject: [PATCH 10/32] replace __BEGIN_DECLS and __END_DECLS
5
6They are not portable across libc implementations
7therefore replace them with expanded macros
8
9Include <asm-generic/types.h> to get __s32 definitions
10its not a generally available typedef
11
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13
14Upstream-Status: Pending
15---
16 testcases/kernel/syscalls/epoll2/include/epoll.h | 8 ++++++--
17 utils/sctp/include/netinet/sctp.h | 9 +++++++--
18 2 files changed, 13 insertions(+), 4 deletions(-)
19
20diff --git a/testcases/kernel/syscalls/epoll2/include/epoll.h b/testcases/kernel/syscalls/epoll2/include/epoll.h
21index be599c7..8cc5e7e 100644
22--- a/testcases/kernel/syscalls/epoll2/include/epoll.h
23+++ b/testcases/kernel/syscalls/epoll2/include/epoll.h
24@@ -85,7 +85,9 @@ struct epoll_event
25 } EPOLL_PACKED;
26
27
28-__BEGIN_DECLS
29+#ifdef __cplusplus
30+extern "C" {
31+#endif
32
33 /* Creates an epoll instance. Returns an fd for the new instance.
34 The "size" parameter is a hint specifying the number of file
35@@ -114,6 +116,8 @@ extern int epoll_ctl (int __epfd, int __op, int __fd,
36 extern int epoll_wait (int __epfd, struct epoll_event *__events,
37 int __maxevents, int __timeout) __THROW;
38
39-__END_DECLS
40+#ifdef __cplusplus
41+}
42+#endif
43
44 #endif /* sys/epoll.h */
45diff --git a/utils/sctp/include/netinet/sctp.h b/utils/sctp/include/netinet/sctp.h
46index 51f5bfb..c61aef3 100644
47--- a/utils/sctp/include/netinet/sctp.h
48+++ b/utils/sctp/include/netinet/sctp.h
49@@ -35,9 +35,12 @@
50
51 #include <stdint.h>
52 #include <linux/types.h>
53+#include <asm-generic/types.h>
54 #include <sys/socket.h>
55
56-__BEGIN_DECLS
57+#ifdef __cplusplus
58+extern "C" {
59+#endif
60
61 typedef __s32 sctp_assoc_t;
62
63@@ -862,6 +865,8 @@ int sctp_recvmsg(int s, void *msg, size_t len, struct sockaddr *from,
64 /* Return the address length for an address family. */
65 int sctp_getaddrlen(sa_family_t family);
66
67-__END_DECLS
68+#ifdef __cplusplus
69+}
70+#endif
71
72 #endif /* __linux_sctp_h__ */
73--
742.7.0
75