diff options
| author | sin | 2015-03-13 23:09:15 +0000 |
|---|---|---|
| committer | sin | 2015-03-13 23:09:15 +0000 |
| commit | d12254166a55d17932ea4143fbd50fb52539ff8b (patch) | |
| tree | 5305a94b78698f8d94b20370e59647276c7b47d0 /include/sys/socket.h | |
| parent | c4abf4497ba24d716250af4186757b5c5952f54e (diff) | |
Restore C++ support
Diffstat (limited to 'include/sys/socket.h')
| -rw-r--r-- | include/sys/socket.h | 7 |
1 files changed, 6 insertions, 1 deletions
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 @@ | |||
| 5 | 5 | ||
| 6 | #if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 && defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 | 6 | #if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 && defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 |
| 7 | 7 | ||
| 8 | #ifndef __cplusplus | 8 | #ifdef __cplusplus |
| 9 | extern "C" { | ||
| 10 | #endif | ||
| 11 | |||
| 9 | #undef recv | 12 | #undef recv |
| 10 | #undef recvfrom | 13 | #undef recvfrom |
| 11 | #undef send | 14 | #undef send |
| @@ -61,6 +64,8 @@ ssize_t sendto(int sockfd, const void *buf, size_t n, int flags, | |||
| 61 | return __sendto_orig(sockfd, buf, n, flags, sa, salen); | 64 | return __sendto_orig(sockfd, buf, n, flags, sa, salen); |
| 62 | } | 65 | } |
| 63 | 66 | ||
| 67 | #ifdef __cplusplus | ||
| 68 | } | ||
| 64 | #endif | 69 | #endif |
| 65 | 70 | ||
| 66 | #endif | 71 | #endif |
