Skip to content

Commit

Permalink
Define _GNU_SOURCE in config.h
Browse files Browse the repository at this point in the history
Same way as libusb/autotools does it.
  • Loading branch information
Ihor Dutchak committed Dec 25, 2023
1 parent 84fb1bb commit ab32b4b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit ab32b4b

Please sign in to comment.