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/wchar.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/wchar.h') diff --git a/include/wchar.h b/include/wchar.h index ca9840a..8a72e35 100644 --- a/include/wchar.h +++ b/include/wchar.h @@ -6,6 +6,10 @@ #if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 && defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 +#ifdef __cplusplus +extern "C" { +#endif + static inline __attribute__ ((always_inline)) wchar_t * __fortify_fgetws(wchar_t *s, int n, FILE *fp) @@ -249,6 +253,10 @@ __fortify_wmemset(wchar_t *s, wchar_t c, size_t n) #undef wmemset #define wmemset(s, c, n) __fortify_wmemset(s, c, n) +#ifdef __cplusplus +} +#endif + #endif #endif -- cgit v1.3