diff options
| author | sin | 2015-03-11 09:26:11 +0000 |
|---|---|---|
| committer | sin | 2015-03-11 09:26:11 +0000 |
| commit | 8604f138c55ab4904a2fd9b7edce2b688c70e6c0 (patch) | |
| tree | b3cc05536f3b7be32faa9dd75d0babbf5fcdbdc5 /include/sys/socket.h | |
| parent | 1fbf7a3a5e9c02cf992848002cfb88c3c7cc0212 (diff) | |
Add ifdef guards for C++ code
Diffstat (limited to '')
| -rw-r--r-- | include/sys/socket.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/sys/socket.h b/include/sys/socket.h index 7044f65..fc7381a 100644 --- a/include/sys/socket.h +++ b/include/sys/socket.h | |||
| @@ -5,6 +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 | #ifdef __cplusplus | ||
| 9 | extern "C" { | ||
| 10 | #endif | ||
| 11 | |||
| 8 | static inline __attribute__ ((always_inline)) | 12 | static inline __attribute__ ((always_inline)) |
| 9 | ssize_t | 13 | ssize_t |
| 10 | __fortify_recv(int sockfd, void *buf, size_t n, int flags) | 14 | __fortify_recv(int sockfd, void *buf, size_t n, int flags) |
| @@ -60,6 +64,10 @@ __fortify_sendto(int sockfd, const void *buf, size_t n, int flags, | |||
| 60 | #undef sendto | 64 | #undef sendto |
| 61 | #define sendto(sockfd, buf, n, flags, sa, salen) __fortify_sendto(sockfd, buf, n, flags, sa, salen) | 65 | #define sendto(sockfd, buf, n, flags, sa, salen) __fortify_sendto(sockfd, buf, n, flags, sa, salen) |
| 62 | 66 | ||
| 67 | #ifdef __cplusplus | ||
| 68 | } | ||
| 69 | #endif | ||
| 70 | |||
| 63 | #endif | 71 | #endif |
| 64 | 72 | ||
| 65 | #endif | 73 | #endif |
