Skip to content

Commit

Permalink
Only change _XOPEN_SOURCE to 600 for Apple.
Browse files Browse the repository at this point in the history
  • Loading branch information
collinsr committed Mar 4, 2021
1 parent ad7941e commit ee3c075
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,14 @@ CPPFLAGS := $(CPPFLAGS)

default: $(O_OBJ:.o=.$(OBJ_EXT))

# -D_XOPEN_SOURCE=500 to enable strdup() definition in C11 mode
# ...actually, needs to be -->600<-- to get strdup; per https://bugs.launchpad.net/libvterm/+bug/1638205
#ifdef __APPLE__
# ...actually, needs to be -->600<-- to get strdup;
# per https://bugs.launchpad.net/libvterm/+bug/1638205
CPPFLAGS := -D_XOPEN_SOURCE=600 $(CPPFLAGS)
#else
# -D_XOPEN_SOURCE=500 to enable strdup() definition in C11 mode
CPPFLAGS := -D_XOPEN_SOURCE=500 $(CPPFLAGS)
#endif

../../o/%.$(OBJ_EXT): %.c
$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
Expand Down

0 comments on commit ee3c075

Please sign in to comment.