summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-05-11 04:23:41 +0100
committerSam James <sam@gentoo.org>2023-05-11 04:23:41 +0100
commitba0f1a99d4e74a5ca8a84da5c013bae719c8ccdc (patch)
treedb1568d6e0a8233c5bad06e16c3b80e26a6862eb
parentnet-misc/netstat-nat: fix modern C issues (diff)
downloadgentoo-ba0f1a99d4e74a5ca8a84da5c013bae719c8ccdc.tar.gz
gentoo-ba0f1a99d4e74a5ca8a84da5c013bae719c8ccdc.tar.bz2
gentoo-ba0f1a99d4e74a5ca8a84da5c013bae719c8ccdc.zip
net-wireless/wepattack: fix modern C issues
Closes: https://bugs.gentoo.org/881007 Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--net-wireless/wepattack/files/wepattack-0.1.3-modern-c.patch33
-rw-r--r--net-wireless/wepattack/wepattack-0.1.3-r6.ebuild (renamed from net-wireless/wepattack/wepattack-0.1.3-r5.ebuild)22
2 files changed, 46 insertions, 9 deletions
diff --git a/net-wireless/wepattack/files/wepattack-0.1.3-modern-c.patch b/net-wireless/wepattack/files/wepattack-0.1.3-modern-c.patch
new file mode 100644
index 000000000000..f24d44813f39
--- /dev/null
+++ b/net-wireless/wepattack/files/wepattack-0.1.3-modern-c.patch
@@ -0,0 +1,33 @@
+https://bugs.gentoo.org/881007
+--- a/src/log.c
++++ b/src/log.c
+@@ -25,6 +25,7 @@
+ #include "log.h"
+ #include "wepattack.h"
+ #include "config.h"
++#include "misc.h"
+
+ static time_t start_time;
+ char logfile[40];
+--- a/src/misc.c
++++ b/src/misc.c
+@@ -23,6 +23,7 @@
+ #include "wepattack.h"
+ #include "config.h"
+ #include "misc.h"
++#include "log.h"
+
+ double difftime_us(struct timeval *time_start, struct timeval *time_end) {
+
+@@ -87,8 +88,10 @@ d_fprintf (FILE *__restrict __stream,
+ __const char *__restrict __format,...) {
+
+ if (DEBUG) {
+- fprintf(__stream, __format);
++ return fprintf(__stream, __format);
+ }
++
++ return 0;
+ }
+
+ void print_hex_array(FILE* out, unsigned char* data, int length) {
diff --git a/net-wireless/wepattack/wepattack-0.1.3-r5.ebuild b/net-wireless/wepattack/wepattack-0.1.3-r6.ebuild
index fd0ca3a478cb..a58936f4d107 100644
--- a/net-wireless/wepattack/wepattack-0.1.3-r5.ebuild
+++ b/net-wireless/wepattack/wepattack-0.1.3-r6.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -17,21 +17,24 @@ KEYWORDS="amd64 x86"
IUSE="john"
DEPEND="
- dev-libs/openssl:0=
+ dev-libs/openssl:=
net-libs/libpcap
sys-libs/zlib
"
-
-RDEPEND="${DEPEND}
- john? ( || (
- app-crypt/johntheripper
- app-crypt/johntheripper-jumbo
+RDEPEND="
+ ${DEPEND}
+ john? (
+ || (
+ app-crypt/johntheripper
+ app-crypt/johntheripper-jumbo
)
- )"
+ )
+"
PATCHES=(
"${FILESDIR}"/${P}-filter-mac-address.patch
"${FILESDIR}"/${P}-missed-string.h-warnings-fix.patch
+ "${FILESDIR}"/${P}-modern-c.patch
)
src_prepare() {
@@ -55,11 +58,12 @@ src_compile() {
}
src_install() {
+ dodoc README
dobin src/wepattack
+
if use john; then
dosbin run/wepattack_{inc,word}
insinto /etc
doins "${FILESDIR}"/wepattack.conf
fi
- dodoc README
}