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
Youw committed Dec 26, 2023
1 parent 84fb1bb commit 25f76f4
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 25f76f4

Please sign in to comment.