add extern "C" to __errno_location's definition if in __cplusplus file

This commit is contained in:
Alex Brachet 2020-03-09 03:10:59 -04:00
parent bdcbdb4848
commit 129c8b8081
1 changed files with 3 additions and 0 deletions

View File

@ -27,6 +27,9 @@ def NullMacro : MacroDef<"NULL"> {
def ErrnoMacro : MacroDef<"errno"> {
let Defn = [{
#ifdef __cplusplus
extern "C"
#endif
int *__errno_location();
#define errno (*__errno_location())
}];