Index: src/libs/3rdparty/sqlite/config.h
--- src/libs/3rdparty/sqlite/config.h.orig
+++ src/libs/3rdparty/sqlite/config.h
@@ -35,7 +35,7 @@
 #define HAVE_UTIME 1
 #endif
 
-#if (_XOPEN_SOURCE >= 500) && !(_POSIX_C_SOURCE >= 200809L) || _DEFAULT_SOURCE || _BSD_SOURCE
+#if (_XOPEN_SOURCE >= 500) && !(_POSIX_C_SOURCE >= 200809L) || _DEFAULT_SOURCE || defined(_BSD_SOURCE)
 #define HAVE_USLEEP 1
 #endif
 
@@ -43,7 +43,7 @@
 #define HAVE_FDATASYNC 1
 #endif
 
-#if _POSIX_C_SOURCE >= 1 || _BSD_SOURCE
+#if _POSIX_C_SOURCE >= 1 || defined(_BSD_SOURCE)
 #define HAVE_LOCALTIME_R 1
 #else
 #define HAVE_LOCALTIME_S 1
