Skip to content

Commit 1c5a17e

Browse files
PixelyIonneheb
authored andcommitted
libarchive: Define _GNU_SOURCE when checking for types
In glibc certain types such as `id_t` are gated behind checks for `__USE_XOPEN` and similar defines that are set set when `_GNU_SOURCE` is defines which is done by libarchive's cmake `config.h.in`. Without this, the types visible to meson during the checks and the compiler during compilation can differ resulting in these types can be defined twice which can cause compilation errors.
1 parent 2db326f commit 1c5a17e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

releases.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1175,6 +1175,7 @@
11751175
"libarchive"
11761176
],
11771177
"versions": [
1178+
"3.7.2-2",
11781179
"3.7.2-1",
11791180
"3.7.1-2",
11801181
"3.7.1-1",

subprojects/packagefiles/libarchive/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ types = {
169169
}
170170

171171
foreach t, v : types
172-
if not cc.has_type(t, prefix: '#include <sys/types.h>')
172+
if not cc.has_type(t, prefix: '#include <sys/types.h>', args: '-D_GNU_SOURCE')
173173
cdata.set(t, v)
174174
endif
175175
endforeach

0 commit comments

Comments
 (0)