lksctp-tools: fix musl build
PATCH 1/1 lksctp-tools: fix musl build
From: Yegor Yefremov <[email protected]>
Add a patch replacing __BEGIN_DECLS/__END_DECLS with "extern "C" {" definition.
Fixes:
http://autobuild.buildroot.net/results/d7d/d7d1c6a13ad788ef74ac0487bf2bdbdcd7d52d40/
http://autobuild.buildroot.net/results/06a/06a76d80701b126789c6c8e867db067e3b927caa/
--- package/lksctp-tools/0001-Fix-musl-build.patch | 46 ++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 package/lksctp-tools/0001-Fix-musl-build.patch
package/lksctp-tools/0001-Fix-musl-build.patch new file +46 -0
@@ -0,0 +1,46 @@ +From 112c17e00246d562fc923ec395f124a7101fda3f Mon Sep 17 00:00:00 2001 +From: Yegor Yefremov <[email protected]> +Date: Thu, 10 Mar 2016 09:30:46 +0100 +Subject: [PATCH] Fix musl build + +Replace __BEGIN_DECLS/__END_DECLS macros with following blocks: + +extern "C" { + +} + +__BEGIN_DECLS/__END_DECLS are not part of all C libraries. + +Signed-off-by: Yegor Yefremov <[email protected]> +--- + src/include/netinet/sctp.h | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/src/include/netinet/sctp.h b/src/include/netinet/sctp.h +index 51f5bfb..47571cd 100644 +--- a/src/include/netinet/sctp.h ++++ b/src/include/netinet/sctp.h +@@ -37,7 +37,9 @@ + #include <linux/types.h> + #include <sys/socket.h> + +-__BEGIN_DECLS ++#ifdef __cplusplus ++extern "C" { ++#endif + + typedef __s32 sctp_assoc_t; + +@@ -862,6 +864,8 @@ int sctp_recvmsg(int s, void *msg, size_t len, struct sockaddr *from, + /* Return the address length for an address family. */ + int sctp_getaddrlen(sa_family_t family); + +-__END_DECLS ++#ifdef __cplusplus ++} ++#endif + + #endif /* __linux_sctp_h__ */ +-- +2.7.0 +
Signature · 1 line
2.7.0
PATCH 1/1 lksctp-tools: fix musl build
Hello,
Quoted 11 lines · yegorslists at googlemail.com
From: Yegor Yefremov <[email protected]>
Add a patch replacing __BEGIN_DECLS/__END_DECLS with "extern "C" {" definition.
Fixes:
http://autobuild.buildroot.net/results/d7d/d7d1c6a13ad788ef74ac0487bf2bdbdcd7d52d40/
http://autobuild.buildroot.net/results/06a/06a76d80701b126789c6c8e867db067e3b927caa/Signed-off-by Yegor Yefremov <[email protected]>
Please submit upstream, thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 lksctp-tools: fix musl build
Quoted 10 lines · Thomas Petazzoni
Hello,
Quoted 7 lines · yegorslists at googlemail.com
From: Yegor Yefremov <[email protected]>
Add a patch replacing __BEGIN_DECLS/__END_DECLS with "extern "C" {" definition.
Fixes:
Quoted 8 lines
Quoted 4 lines
http://autobuild.buildroot.net/results/d7d/d7d1c6a13ad788ef74ac0487bf2bdbdcd7d52d40/
http://autobuild.buildroot.net/results/06a/06a76d80701b126789c6c8e867db067e3b927caa/Signed-off-by Yegor Yefremov <[email protected]>Reviewed-by Thomas Petazzoni <[email protected]>Please submit upstream, thanks!
Patch already accepted upstream.
Yegor
PATCH 1/1 lksctp-tools: fix musl build
In reply to yegorslists at googlemail.comQuoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"yegorslists" == yegorslists <[email protected]> writes:
From: Yegor Yefremov <[email protected]> Add a patch replacing __BEGIN_DECLS/__END_DECLS with "extern "C" {" definition.
Quoted 6 lines
Fixes:
http://autobuild.buildroot.net/results/d7d/d7d1c6a13ad788ef74ac0487bf2bdbdcd7d52d40/
http://autobuild.buildroot.net/results/06a/06a76d80701b126789c6c8e867db067e3b927caa/Signed-off-by Yegor Yefremov <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard