From cff64d03c85696fab4fcb03313dd4d52f7fd50de Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 12 Aug 2022 12:44:15 +0200 Subject: [PATCH] git-compat-util: avoid redeclaring _DEFAULT_SOURCE We are about to vendor in `mimalloc`'s source code which we will want to include `compat/posix.h` after defining that constant. Signed-off-by: Johannes Schindelin --- compat/posix.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compat/posix.h b/compat/posix.h index 245386fa4a..6a137480d9 100644 --- a/compat/posix.h +++ b/compat/posix.h @@ -70,7 +70,9 @@ #define _ALL_SOURCE 1 #define _GNU_SOURCE 1 #define _BSD_SOURCE 1 +#ifndef _DEFAULT_SOURCE #define _DEFAULT_SOURCE 1 +#endif #define _NETBSD_SOURCE 1 #define _SGI_SOURCE 1