diff options
author | Sergey Popov <pinkbyte@gentoo.org> | 2022-08-23 10:02:49 +0300 |
---|---|---|
committer | Sergey Popov <pinkbyte@gentoo.org> | 2022-08-23 10:03:01 +0300 |
commit | 1356604f1f11718271781b70014347f1cafff82e (patch) | |
tree | a5cb4f60432fb28288f3b521e573b9f5ad27f5b4 | |
parent | www-client/firefox-bin: add 91.13.0, drop 91.12.0 (diff) | |
download | gentoo-1356604f1f11718271781b70014347f1cafff82e.tar.gz gentoo-1356604f1f11718271781b70014347f1cafff82e.tar.bz2 gentoo-1356604f1f11718271781b70014347f1cafff82e.zip |
net-misc/dhcdrop: bump EAPI to 8, fix building with -flto
Reported-by: Agostino Sarubbo <ago@gentoo.org>
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Vladimir Pavljuchenkov <spiderx@spiderx.dp.ua>
Signed-off-by: Sergey Popov <pinkbyte@gentoo.org>
Closes: https://bugs.gentoo.org/861608
Closes: https://github.com/gentoo/gentoo/pull/26942
-rw-r--r-- | net-misc/dhcdrop/dhcdrop-0.5-r1.ebuild | 11 | ||||
-rw-r--r-- | net-misc/dhcdrop/files/dhcdrop-0.5-lto.patch | 33 |
2 files changed, 41 insertions, 3 deletions
diff --git a/net-misc/dhcdrop/dhcdrop-0.5-r1.ebuild b/net-misc/dhcdrop/dhcdrop-0.5-r1.ebuild index 5757f718f4d5..a8e991173aaa 100644 --- a/net-misc/dhcdrop/dhcdrop-0.5-r1.ebuild +++ b/net-misc/dhcdrop/dhcdrop-0.5-r1.ebuild @@ -1,7 +1,7 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=7 +EAPI=8 DESCRIPTION="Effectively suppresses illegal DHCP servers on the LAN" HOMEPAGE="http://www.netpatch.ru/dhcdrop.html" @@ -19,13 +19,18 @@ DEPEND="static? ( net-libs/libpcap[static-libs] ) DOCS=( AUTHORS ChangeLog INSTALL NEWS README ) +PATCHES=( + # Fix building with -flto, bug #861608 + "${FILESDIR}/${P}-lto.patch" +) + src_prepare() { # Fix building with clang, bug #731694 sed -i \ -e '/^PACKAGE_/s/"//g' \ configure || die - eapply_user + default } src_configure() { diff --git a/net-misc/dhcdrop/files/dhcdrop-0.5-lto.patch b/net-misc/dhcdrop/files/dhcdrop-0.5-lto.patch new file mode 100644 index 000000000000..240303aa2bf2 --- /dev/null +++ b/net-misc/dhcdrop/files/dhcdrop-0.5-lto.patch @@ -0,0 +1,33 @@ +--- a/src/dhcdrop.h 2022-08-23 09:57:15.594679182 +0300 ++++ b/src/dhcdrop.h 2022-08-23 09:57:31.034678048 +0300 +@@ -207,9 +207,9 @@ + inline void replace_semicolons(char * str_ether); + + /* Print ethernet address as hex-digits string */ +-inline void print_ether(const uint8_t * ether_addr); ++static void print_ether(const uint8_t * ether_addr); + + /* Create random ethernet address and store to string 'str_mac_addr' */ +-inline void rand_ether_addr(char * str_mac_addr); ++static void rand_ether_addr(char * str_mac_addr); + + #endif /* ifdef DHCDROP_H*/ +--- a/src/dhcdrop.c 2022-08-23 09:57:09.522679628 +0300 ++++ b/src/dhcdrop.c 2022-08-23 09:57:47.810676815 +0300 +@@ -1879,14 +1879,14 @@ + } + } + +-inline void print_ether(const uint8_t * ether_addr) ++static void print_ether(const uint8_t * ether_addr) + { + int i; + for(i = 0; i < ETH_ALEN; ++i) + printf((i == (ETH_ALEN - 1) ) ? "%02X" :"%02X:", ether_addr[i]); + } + +-inline void rand_ether_addr(char * str_mac_addr) /* Minimal size of str_mac_addr must be STR_MAC_LEN (18) */ ++static void rand_ether_addr(char * str_mac_addr) /* Minimal size of str_mac_addr must be STR_MAC_LEN (18) */ + { + /* Fill first byte */ + strncat(str_mac_addr, "00:", 3); |