From 1c5a17ee3cba0a731ec9004d280eaa41be5499ab Mon Sep 17 00:00:00 2001 From: Mark Collins Date: Fri, 15 Sep 2023 08:59:30 +0000 Subject: [PATCH] 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. --- releases.json | 1 + subprojects/packagefiles/libarchive/meson.build | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/releases.json b/releases.json index 4f0b50a02..ebeb8be72 100644 --- a/releases.json +++ b/releases.json @@ -1175,6 +1175,7 @@ "libarchive" ], "versions": [ + "3.7.2-2", "3.7.2-1", "3.7.1-2", "3.7.1-1", diff --git a/subprojects/packagefiles/libarchive/meson.build b/subprojects/packagefiles/libarchive/meson.build index 801a343fd..c1dc4b18d 100644 --- a/subprojects/packagefiles/libarchive/meson.build +++ b/subprojects/packagefiles/libarchive/meson.build @@ -169,7 +169,7 @@ types = { } foreach t, v : types - if not cc.has_type(t, prefix: '#include ') + if not cc.has_type(t, prefix: '#include ', args: '-D_GNU_SOURCE') cdata.set(t, v) endif endforeach