From d12254166a55d17932ea4143fbd50fb52539ff8b Mon Sep 17 00:00:00 2001 From: sin Date: Fri, 13 Mar 2015 23:09:15 +0000 Subject: Restore C++ support --- include/stdlib.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include/stdlib.h') diff --git a/include/stdlib.h b/include/stdlib.h index f4a026b..9d3698a 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -9,7 +9,9 @@ #if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 && defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 -#ifndef __cplusplus +#ifdef __cplusplus +extern "C" { +#endif #if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) #undef realpath @@ -33,6 +35,8 @@ char *realpath(const char *path, char *resolved) } #endif +#ifdef __cplusplus +} #endif #endif -- cgit v1.3