diff options
Diffstat (limited to 'include/sys')
| -rw-r--r-- | include/sys/select.h | 6 | ||||
| -rw-r--r-- | include/sys/socket.h | 7 |
2 files changed, 11 insertions, 2 deletions
diff --git a/include/sys/select.h b/include/sys/select.h index 7838041..9c3afa5 100644 --- a/include/sys/select.h +++ b/include/sys/select.h | |||
| @@ -5,7 +5,9 @@ | |||
| 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 | ||
| 9 | 11 | ||
| 10 | static __inline __attribute__((__always_inline__,__gnu_inline__)) | 12 | static __inline __attribute__((__always_inline__,__gnu_inline__)) |
| 11 | int __fortify_FD_CLR(int fd, fd_set *set) | 13 | int __fortify_FD_CLR(int fd, fd_set *set) |
| @@ -32,6 +34,8 @@ int __fortify_FD_SET(int fd, fd_set *set) | |||
| 32 | #undef FD_SET | 34 | #undef FD_SET |
| 33 | #define FD_SET(fd, set) __fortify_FD_SET(fd, set) | 35 | #define FD_SET(fd, set) __fortify_FD_SET(fd, set) |
| 34 | 36 | ||
| 37 | #ifdef __cplusplus | ||
| 38 | } | ||
| 35 | #endif | 39 | #endif |
| 36 | 40 | ||
| 37 | #endif | 41 | #endif |
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 |
