Skip to content

Commit

Permalink
meson.build: do not define _GNU_SOURCE with MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxKellermann committed Dec 21, 2023
1 parent 70e3a11 commit 66eb8f1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,13 @@ endif
version_h = configure_file(input: 'include/mpd/version.h.in', output: 'version.h', configuration: version_conf)

common_cflags = [
# for strdup() with glibc
'-D_GNU_SOURCE',
]

if cc.get_id() != 'msvc'
# for strdup() with glibc
common_cflags += '-D_GNU_SOURCE'
endif

test_cflags = [
'-Wcast-align',
'-Wcast-qual',
Expand Down

0 comments on commit 66eb8f1

Please sign in to comment.