From 021aa319d56eeee12d65e5a94ba994819fad9eed Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 23 Jul 2023 16:12:26 -0700 Subject: [PATCH] Linux: Use _DEFAULT_SOURCE. Needed for gettimeofday() etc. Keeping _BSD_SOURCE for now for compatibility. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 452b74f1a8..9d2e98ac9c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -416,7 +416,7 @@ if(NOT MSVC) add_definitions(-Wno-psabi) endif() add_definitions(-D_XOPEN_SOURCE=700) - add_definitions(-D_XOPEN_SOURCE_EXTENDED -D__BSD_VISIBLE=1 -D_BSD_SOURCE) + add_definitions(-D_XOPEN_SOURCE_EXTENDED -D__BSD_VISIBLE=1 -D_BSD_SOURCE -D_DEFAULT_SOURCE) add_definitions(-D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64) elseif(ANDROID) add_definitions(-fsigned-char)