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/unistd.h | |
| parent | 1fbf7a3a5e9c02cf992848002cfb88c3c7cc0212 (diff) | |
Add ifdef guards for C++ code
Diffstat (limited to 'include/unistd.h')
| -rw-r--r-- | include/unistd.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/unistd.h b/include/unistd.h index 6b502b5..2403db1 100644 --- a/include/unistd.h +++ b/include/unistd.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 | size_t | 13 | size_t |
| 10 | __fortify_confstr(int name, char *buf, size_t len) | 14 | __fortify_confstr(int name, char *buf, size_t len) |
| @@ -168,6 +172,10 @@ __fortify_write(int fd, const void *buf, size_t n) | |||
| 168 | #undef write | 172 | #undef write |
| 169 | #define write(fd, buf, n) __fortify_write(fd, buf, n) | 173 | #define write(fd, buf, n) __fortify_write(fd, buf, n) |
| 170 | 174 | ||
| 175 | #ifdef __cplusplus | ||
| 176 | } | ||
| 177 | #endif | ||
| 178 | |||
| 171 | #endif | 179 | #endif |
| 172 | 180 | ||
| 173 | #endif | 181 | #endif |
