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/stdlib.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/stdlib.h') diff --git a/include/stdlib.h b/include/stdlib.h index 35bff81..312555c 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -9,6 +9,10 @@ #if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 && defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 +#ifdef __cplusplus +extern "C" { +#endif + #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) static inline __attribute__ ((always_inline)) char * @@ -32,6 +36,10 @@ __fortify_realpath(const char *path, char *resolved) #define realpath(path, resolved) __fortify_realpath(path, resolved) #endif +#ifdef __cplusplus +} +#endif + #endif #endif -- cgit v1.3