summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-10-25 14:02:01 +0100
committerSam James <sam@gentoo.org>2022-10-25 14:02:06 +0100
commit8c87820a089f8a2fb76bbd3ba5dd2783682e5744 (patch)
treed1ea80830833554af3453d6dac29b77a7c24ac88 /net-misc/wol
parentsys-apps/memtest86+: add 6.00 (diff)
downloadgentoo-8c87820a089f8a2fb76bbd3ba5dd2783682e5744.tar.gz
gentoo-8c87820a089f8a2fb76bbd3ba5dd2783682e5744.tar.bz2
gentoo-8c87820a089f8a2fb76bbd3ba5dd2783682e5744.zip
net-misc/wol: Clang 16 fixes
Still hosed with newer linux-headers. Bug: https://bugs.gentoo.org/874420 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-misc/wol')
-rw-r--r--net-misc/wol/files/wol-0.7.1-Fix-config.h-test-consumption.patch35
-rw-r--r--net-misc/wol/files/wol-0.7.1-Fix-malloc-detection.patch39
-rw-r--r--net-misc/wol/wol-0.7.1-r3.ebuild15
3 files changed, 87 insertions, 2 deletions
diff --git a/net-misc/wol/files/wol-0.7.1-Fix-config.h-test-consumption.patch b/net-misc/wol/files/wol-0.7.1-Fix-config.h-test-consumption.patch
new file mode 100644
index 000000000000..897517a97f44
--- /dev/null
+++ b/net-misc/wol/files/wol-0.7.1-Fix-config.h-test-consumption.patch
@@ -0,0 +1,35 @@
+From 1c16d04a3fc03a5f4c0cd54ff6f207de1062e9bd Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Tue, 25 Oct 2022 13:54:04 +0100
+Subject: [PATCH] Fix config.h test consumption
+
+Bug: https://bugs.gentoo.org/874420
+--- a/lib/ether.h
++++ b/lib/ether.h
+@@ -35,7 +35,7 @@
+
+ #include "magic.h"
+
+-#if !HAVE_STRUCT_ETHER_ADDR_ETHER_ADDR_OCTET && !HAVE_STRUCT_ETHER_ADDR_OCTET
++#if !defined(HAVE_STRUCT_ETHER_ADDR_ETHER_ADDR_OCTET) && !defined(HAVE_STRUCT_ETHER_ADDR_OCTET)
+
+ struct
+ ether_addr
+@@ -45,7 +45,7 @@ ether_addr
+
+ #define ETHER_ADDR_OCTET ether_addr_octet
+
+-#else /* HAVE_STRUCT_ETHER_ADDR_ETHER_ADDR_OCTET || HAVE_STRUCT_ETHER_ADDR_OCTET */
++#else /* defined(HAVE_STRUCT_ETHER_ADDR_ETHER_ADDR_OCTET) || defined(HAVE_STRUCT_ETHER_ADDR_OCTET) */
+
+ #if HAVE_STRUCT_ETHER_ADDR_OCTET
+ #define ETHER_ADDR_OCTET octet
+@@ -55,7 +55,7 @@ ether_addr
+ #define ETHER_ADDR_OCTET ether_addr_octet
+ #endif /* HAVE_STRUCT_ETHER_ADDR_ETHER_ADDR_OCTET */
+
+-#endif /* !HAVE_STRUCT_ETHER_ADDR_ETHER_ADDR_OCTET && !HAVE_STRUCT_ETHER_ADDR_OCTET */
++#endif /* !defined(HAVE_STRUCT_ETHER_ADDR_ETHER_ADDR_OCTET) && !defined(HAVE_STRUCT_ETHER_ADDR_OCTET) */
+
+
+ #if !defined(HAVE_ETHER_HOSTTON)
diff --git a/net-misc/wol/files/wol-0.7.1-Fix-malloc-detection.patch b/net-misc/wol/files/wol-0.7.1-Fix-malloc-detection.patch
new file mode 100644
index 000000000000..6f783e9cfaed
--- /dev/null
+++ b/net-misc/wol/files/wol-0.7.1-Fix-malloc-detection.patch
@@ -0,0 +1,39 @@
+https://bugs.gentoo.org/874420
+
+From bcf98fe9a674a3784ad1a4f8eecc3b31a7b209a9 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Tue, 25 Oct 2022 14:00:23 +0100
+Subject: [PATCH] Fix malloc detection
+
+--- a/m4/getline.m4
++++ b/m4/getline.m4
+@@ -18,6 +18,7 @@ AC_DEFUN([AM_FUNC_GETLINE],
+ # include <stdio.h>
+ # include <sys/types.h>
+ # include <string.h>
++# include <stdlib.h>
+ int main ()
+ { /* Based on a test program from Karl Heuer. */
+ char *line = NULL;
+--- a/m4/malloc.m4
++++ b/m4/malloc.m4
+@@ -14,6 +14,7 @@ AC_DEFUN([jm_FUNC_MALLOC],
+
+ AC_CACHE_CHECK([for working malloc], jm_cv_func_working_malloc,
+ [AC_TRY_RUN([
++ #include <stdlib.h>
+ char *malloc ();
+ int
+ main ()
+--- a/m4/realloc.m4
++++ b/m4/realloc.m4
+@@ -14,7 +14,8 @@ AC_DEFUN([jm_FUNC_REALLOC],
+
+ AC_CACHE_CHECK([for working realloc], jm_cv_func_working_realloc,
+ [AC_TRY_RUN([
+- char *realloc ();
++ #include <stdlib.h>
++ void *realloc(void *ptr, size_t size);
+ int
+ main ()
+ {
diff --git a/net-misc/wol/wol-0.7.1-r3.ebuild b/net-misc/wol/wol-0.7.1-r3.ebuild
index 4b4ba0165cd9..3bcd9963ecdb 100644
--- a/net-misc/wol/wol-0.7.1-r3.ebuild
+++ b/net-misc/wol/wol-0.7.1-r3.ebuild
@@ -3,7 +3,7 @@
EAPI=8
-inherit toolchain-funcs
+inherit autotools toolchain-funcs
DESCRIPTION="Implements Wake On LAN (Magic Paket) functionality in a small program"
HOMEPAGE="http://ahh.sourceforge.net/wol/"
@@ -14,7 +14,18 @@ SLOT="0"
KEYWORDS="amd64 arm arm64 ~hppa ~ia64 ppc ppc64 ~sparc x86"
IUSE="nls"
-PATCHES=( "${FILESDIR}/${P}-musl.patch" )
+PATCHES=(
+ "${FILESDIR}/${P}-musl.patch"
+ "${FILESDIR}/${P}-Fix-config.h-test-consumption.patch"
+ "${FILESDIR}/${P}-Fix-malloc-detection.patch"
+)
+
+src_prepare() {
+ default
+
+ # bug #874420
+ eautoreconf
+}
src_configure() {
local myeconfargs=(