From 33a0878f6a8cb7e81822e5a52459187db05b171f Mon Sep 17 00:00:00 2001 From: Ole Morud Date: Thu, 8 Jan 2026 15:45:38 +0100 Subject: [PATCH] Set required feature flag macro for Linux builds --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 84f3cc3..0a300fa 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ CFLAGS.gcc := -std=c23 -Wall -Wextra -Wconversion -Wno-unused-function CFLAGS.gcc.release := -Ofast -march=native -DNDEBUG CFLAGS.gcc.debug := -ggdb -O1 -fsanitize=address -CFLAGS.clang := -std=c23 -g -Wall -Wextra -Wconversion -Wno-unused-function -Wimplicit-int-conversion +CFLAGS.clang := -std=c23 -g -Wall -Wextra -Wconversion -Wno-unused-function -Wimplicit-int-conversion -Wno-macro-redefined CFLAGS.clang.release := -O3 -ffast-math -march=native -DNDEBUG -DNSTATS CFLAGS.clang.debug := -g3 -O1 -fsanitize=address,undefined CFLAGS.clang.wasm := \ @@ -22,7 +22,7 @@ all: tests wasm: chess.wasm codegen: codegen.c - $(CC) -o $@ $(CFLAGS) $^ + $(CC) -D_DEFAULT_SOURCE -o $@ $(CFLAGS) $^ chess.wasm: wasm-compat.c mbb_rook.h mbb_bishop.h engine.h $(CC) -DWASM -o $@ wasm-compat.c $(CFLAGS.$(CC)) $(CFLAGS.$(CC).wasm) @@ -34,4 +34,4 @@ mbb_bishop.h: codegen ./codegen tests: tests.c mbb_rook.h mbb_bishop.h engine.h - $(CC) -o $@ $(CFLAGS) tests.c + $(CC) -D_DEFAULT_SOURCE -o $@ $(CFLAGS) tests.c