From d12254166a55d17932ea4143fbd50fb52539ff8b Mon Sep 17 00:00:00 2001 From: sin Date: Fri, 13 Mar 2015 23:09:15 +0000 Subject: Restore C++ support --- include/sys/socket.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include/sys/socket.h') diff --git a/include/sys/socket.h b/include/sys/socket.h index 4602866..81358fd 100644 --- a/include/sys/socket.h +++ b/include/sys/socket.h @@ -5,7 +5,10 @@ #if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 && defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 -#ifndef __cplusplus +#ifdef __cplusplus +extern "C" { +#endif + #undef recv #undef recvfrom #undef send @@ -61,6 +64,8 @@ ssize_t sendto(int sockfd, const void *buf, size_t n, int flags, return __sendto_orig(sockfd, buf, n, flags, sa, salen); } +#ifdef __cplusplus +} #endif #endif -- cgit v1.3