summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-11-05 23:58:31 +0000
committerSam James <sam@gentoo.org>2022-11-06 01:49:32 +0000
commit3e56cd93c27c158d848d6f495b3563816f49e888 (patch)
tree826ce86bf7cd34af073801a65729b928db576234 /net-dns
parentsys-apps/man2html: further Clang 15 configure fixes (diff)
downloadgentoo-3e56cd93c27c158d848d6f495b3563816f49e888.tar.gz
gentoo-3e56cd93c27c158d848d6f495b3563816f49e888.tar.bz2
gentoo-3e56cd93c27c158d848d6f495b3563816f49e888.zip
net-dns/avahi: fix configure w/ -Werror=strict-prototypes
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-dns')
-rw-r--r--net-dns/avahi/avahi-0.8-r7.ebuild (renamed from net-dns/avahi/avahi-0.8-r6.ebuild)1
-rw-r--r--net-dns/avahi/files/avahi-0.8-strict-prototypes.patch38
2 files changed, 39 insertions, 0 deletions
diff --git a/net-dns/avahi/avahi-0.8-r6.ebuild b/net-dns/avahi/avahi-0.8-r7.ebuild
index 73f14ba3bf3c..ed36d9edfc0c 100644
--- a/net-dns/avahi/avahi-0.8-r6.ebuild
+++ b/net-dns/avahi/avahi-0.8-r7.ebuild
@@ -74,6 +74,7 @@ PATCHES=(
"${FILESDIR}/${P}-dependency-error.patch"
"${FILESDIR}/${P}-null-pointer-crash.patch"
"${FILESDIR}/${P}-potentially-undefined-fix.patch"
+ "${FILESDIR}/${P}-strict-prototypes.patch"
# These patches do not apply cleanly but may need to be re-instated.
# I'll leave them commented out for now.
# "${FILESDIR}/${PN}-0.7-qt5.patch"
diff --git a/net-dns/avahi/files/avahi-0.8-strict-prototypes.patch b/net-dns/avahi/files/avahi-0.8-strict-prototypes.patch
new file mode 100644
index 000000000000..3954aa4357ae
--- /dev/null
+++ b/net-dns/avahi/files/avahi-0.8-strict-prototypes.patch
@@ -0,0 +1,38 @@
+https://github.com/lathiat/avahi/pull/405
+
+From 54409e5af9c382117b67674756971f4f1bf646f8 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Sat, 5 Nov 2022 23:49:47 +0000
+Subject: [PATCH] configure.ac: fix -Wstrict-prototypes
+
+Fixes errors like:
+```
+-ignoreme: warning: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Wdeprecated-non-prototype]
++ignoreme: error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
+ void test_broken_ssp(c)
+ ^
+```
+
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/configure.ac
++++ b/configure.ac
+@@ -99,8 +99,7 @@ if test x"$enable_ssp" = x"yes"; then
+ LDFLAGS="$LDFLAGS -Wl,-z,defs"
+ cat confdefs.h > conftest.c
+ cat >>conftest.c <<_ACEOF
+-void test_broken_ssp(c)
+- const char *c;
++void test_broken_ssp(const char *c)
+ {
+ char arr[[123]], *p; /* beware of possible double-braces if copying this */
+ for (p = arr; *c; ++p) {
+@@ -300,7 +299,7 @@ AM_CONDITIONAL(TARGET_FREEBSD, test x"$with_distro" = xfreebsd)
+ AM_CONDITIONAL(TARGET_SLACKWARE, test x"$with_distro" = xslackware)
+
+ test_gcc_flag() {
+- AC_LANG_CONFTEST([int main() {}])
++ AC_LANG_CONFTEST([int main(void) {}])
+ $CC -c conftest.c $CFLAGS $@ > /dev/null 2> /dev/null
+ ret=$?
+ rm -f conftest.o
+