From 8604f138c55ab4904a2fd9b7edce2b688c70e6c0 Mon Sep 17 00:00:00 2001 From: sin Date: Wed, 11 Mar 2015 09:26:11 +0000 Subject: Add ifdef guards for C++ code --- include/unistd.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/unistd.h') 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 @@ #if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 && defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 +#ifdef __cplusplus +extern "C" { +#endif + static inline __attribute__ ((always_inline)) size_t __fortify_confstr(int name, char *buf, size_t len) @@ -168,6 +172,10 @@ __fortify_write(int fd, const void *buf, size_t n) #undef write #define write(fd, buf, n) __fortify_write(fd, buf, n) +#ifdef __cplusplus +} +#endif + #endif #endif -- cgit v1.3