summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-02-28 03:20:15 +0000
committerSam James <sam@gentoo.org>2023-02-28 03:20:15 +0000
commit5fa97bca95c5a6ff2448bf1abe7ef96016d2be7a (patch)
tree29ad4830154699c6794c78fc2890be0e157288cb
parentapp-shells/bash: backport clang 16 configure fix to 5.1 (diff)
downloadgentoo-5fa97bca.tar.gz
gentoo-5fa97bca.tar.bz2
gentoo-5fa97bca.zip
sys-apps/accountsservice: fix configure w/ clang 16
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--sys-apps/accountsservice/accountsservice-22.08.8-r1.ebuild (renamed from sys-apps/accountsservice/accountsservice-22.08.8.ebuild)1
-rw-r--r--sys-apps/accountsservice/files/accountsservice-22.08.8-configure-clang16.patch33
2 files changed, 34 insertions, 0 deletions
diff --git a/sys-apps/accountsservice/accountsservice-22.08.8.ebuild b/sys-apps/accountsservice/accountsservice-22.08.8-r1.ebuild
index 9f34a6d97636..738666099808 100644
--- a/sys-apps/accountsservice/accountsservice-22.08.8.ebuild
+++ b/sys-apps/accountsservice/accountsservice-22.08.8-r1.ebuild
@@ -51,6 +51,7 @@ RDEPEND="${CDEPEND}
PATCHES=(
"${FILESDIR}"/${PN}-22.04.62-gentoo-system-users.patch
+ "${FILESDIR}"/${P}-configure-clang16.patch
)
python_check_deps() {
diff --git a/sys-apps/accountsservice/files/accountsservice-22.08.8-configure-clang16.patch b/sys-apps/accountsservice/files/accountsservice-22.08.8-configure-clang16.patch
new file mode 100644
index 000000000000..939418752731
--- /dev/null
+++ b/sys-apps/accountsservice/files/accountsservice-22.08.8-configure-clang16.patch
@@ -0,0 +1,33 @@
+https://gitlab.freedesktop.org/accountsservice/accountsservice/-/commit/453f893e3c38c209ae9dff47bca74ccb33a5bd34
+
+From 453f893e3c38c209ae9dff47bca74ccb33a5bd34 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Tue, 28 Feb 2023 02:31:50 +0000
+Subject: [PATCH] meson.build: fix -Wimplicit-function-declaration in configure
+ tests for printf
+
+<stdio.h> needs to be included for printf. Newer compilers like Clang 16 make
+implicit function declarations an error by default which can cause misleading
+or incorrect configure test results.
+
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/meson.build
++++ b/meson.build
+@@ -79,6 +79,7 @@ endforeach
+
+ if cc.has_header_symbol('utmpx.h', 'WTMPX_FILENAME', prefix: '#define _GNU_SOURCE')
+ code = '''#define _GNU_SOURCE
++ #include <stdio.h>
+ #include <utmpx.h>
+ int main (int argc, char **argv) {
+ printf ("%s\n", WTMPX_FILENAME);
+@@ -91,6 +92,7 @@ if cc.has_header_symbol('utmpx.h', 'WTMPX_FILENAME', prefix: '#define _GNU_SOURC
+ config_h.set('PATH_WTMP', 'WTMPX_FILENAME')
+ elif cc.has_header_symbol('paths.h', '_PATH_WTMPX')
+ code = '''#include <paths.h>
++ #include <stdio.h>
+ int main (int argc, char **argv) {
+ printf ("%s\n", _PATH_WTMPX);
+ return 0;
+--
+GitLab