Skip to content

Commit 1bcf2e3

Browse files
committed
Referencing environ needs extern on BSD.
See e.g., LibcOverlayShims.h in Swift.
1 parent 808e89e commit 1bcf2e3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

CoreFoundation/Base.subproj/CFPlatform.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1630,6 +1630,9 @@ CF_EXPORT char **_CFEnviron(void) {
16301630
#elif TARGET_OS_WIN32
16311631
return _environ;
16321632
#else
1633+
#if TARGET_OS_BSD
1634+
extern char **environ;
1635+
#endif
16331636
return environ;
16341637
#endif
16351638
}

0 commit comments

Comments
 (0)