From 25f76f402e830e9c6ba8924f407858f22d671ed6 Mon Sep 17 00:00:00 2001 From: Ihor Dutchak Date: Tue, 26 Dec 2023 11:33:05 +0200 Subject: [PATCH] Define _GNU_SOURCE in config.h Same way as libusb/autotools does it. --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index db4ccee..7b2e459 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,6 +71,9 @@ function(generate_config_file) endif() file(MAKE_DIRECTORY "${LIBUSB_GEN_INCLUDES}") + if(NOT MSVC) + set(_GNU_SOURCE TRUE) + endif() configure_file(config.h.in "${LIBUSB_GEN_INCLUDES}/config.h" @ONLY) endfunction()