Skip to content

Commit

Permalink
build: stop setting _POSIX_C_SOURCE
Browse files Browse the repository at this point in the history
from feature_test_macros(7):

> Defining _XOPEN_SOURCE with a value of 700 or greater produces the
> same effects as defining _POSIX_C_SOURCE with a value of 200809L or
> greater.

Depending on the configuration and system pkg-conf files there can be
redefinition warnings. Rather than patching with a -U_POSIX_C_SOURCE
it can just be dropped instead.
  • Loading branch information
rnpnr committed Aug 16, 2023
1 parent 4360440 commit 3134de1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ CONFIG_TRE ?= 0
CONFIG_ACL ?= 0
CONFIG_SELINUX ?= 0

CFLAGS_STD ?= -std=c99 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -DNDEBUG -MMD
CFLAGS_STD ?= -std=c99 -U_XOPEN_SOURCE -D_XOPEN_SOURCE=700 -DNDEBUG -MMD
CFLAGS_STD += -DVERSION=\"${VERSION}\"
LDFLAGS_STD ?= -lc

Expand Down
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ tryflag CFLAGS_TRY -Werror=unused-command-line-argument
tryldflag LDFLAGS_TRY -Werror=unknown-warning-option
tryldflag LDFLAGS_TRY -Werror=unused-command-line-argument

CFLAGS_STD="-std=c99 -D_POSIX_C_SOURCE=200809L -U_XOPEN_SOURCE -D_XOPEN_SOURCE=700 -DNDEBUG -MMD"
CFLAGS_STD="-std=c99 -U_XOPEN_SOURCE -D_XOPEN_SOURCE=700 -DNDEBUG -MMD"
LDFLAGS_STD="-lc"

OS=$(uname)
Expand Down

0 comments on commit 3134de1

Please sign in to comment.