Skip to content

Commit cd35712

Browse files
barracuda156richgillam
authored andcommitted
ICU-23099 uposixdefs.h: define _DARWIN_C_SOURCE on macOS
1 parent 4ea8af8 commit cd35712

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

icu4c/source/common/uposixdefs.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,9 @@
7474
#define _POSIX_C_SOURCE 200809L
7575
#endif
7676

77+
/* Prevent _XOPEN_SOURCE from breaking build on macOS when aligned_alloc exists. */
78+
#if defined(__APPLE__) && !defined(_DARWIN_C_SOURCE)
79+
# define _DARWIN_C_SOURCE
80+
#endif
81+
7782
#endif /* __UPOSIXDEFS_H__ */

0 commit comments

Comments
 (0)