]> git.ipfire.org Git - thirdparty/libbsd.git/commitdiff
build: Disable CRT warnings on Windows
authorAaron Dierking <aarond@fb.com>
Thu, 14 Jun 2018 18:38:33 +0000 (11:38 -0700)
committerGuillem Jover <guillem@hadrons.org>
Thu, 8 Aug 2019 01:22:09 +0000 (03:22 +0200)
These warnings are not helpful for libbsd.

[guillem@hadrons.org:
 - Rename WINDOWS conditional to OS_WINDOWS.
 - Add a nil terminator to the AM_CPPFLAGS. ]

Signed-off-by: Guillem Jover <guillem@hadrons.org>
src/Makefile.am

index 76222a3c1653f68c872c4223b7a8106db08579eb..8384b92ce57a206a9f59e44a3cd748d8ee93c004 100644 (file)
@@ -7,6 +7,13 @@ AM_CPPFLAGS = \
        -DLIBBSD_OVERLAY -DLIBBSD_DISABLE_DEPRECATED \
        -D__REENTRANT
 
+if OS_WINDOWS
+AM_CPPFLAGS += \
+       -D_CRT_SECURE_NO_WARNINGS \
+       -D_CRT_NONSTDC_NO_WARNINGS \
+       $(nil)
+endif
+
 libbsd_la_included_sources = \
        hash/helper.c \
        getentropy_aix.c \