Skip to content

Commit

Permalink
Merge pull request #206 from gemesa/fortify-source
Browse files Browse the repository at this point in the history
Remove _FORTIFY_SOURCE definitions
  • Loading branch information
GoGoOtaku committed Nov 28, 2023
2 parents 84fbe8e + 2ce4316 commit 4a87bc9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion lib/libpe/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ override CFLAGS += \
-I"./include" \
-fPIC \
-W -Wall -Wextra -pedantic -std=c99 -c
override CPPFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2

#override LDFLAGS += -lssl -lcrypto
LIBS = -lssl -lcrypto -lm

Expand Down
7 changes: 0 additions & 7 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,6 @@ override CPPFLAGS += \
-DSHAREDIR="\"$(SHAREDIR)"\" \
-DPLUGINSDIR="\"$(pluginsdir)"\"

# Some gcc/clang builds (depends on the distro) already define _FORTIFY_SOURCE internally, so we
# only define it if it has not been already. This avoids redefinition warnings and weakening
# those distros' hardening settings.
ifneq ($(findstring _FORTIFY_SOURCE, $(CPPFLAGS)), _FORTIFY_SOURCE)
override CPPFLAGS += -D_FORTIFY_SOURCE=1
endif

ifeq ($(PLATFORM_OS), Darwin)
# We disable warnings for deprecated declarations since Apple deprecated OpenSSL in Mac OS X 10.7
override CFLAGS += -Wno-deprecated-declarations
Expand Down

0 comments on commit 4a87bc9

Please sign in to comment.