From df80a9ed7657632df9fe8283b3e1fea5983dcc5c Mon Sep 17 00:00:00 2001 From: mio Date: Sat, 7 Sep 2024 03:42:26 +0000 Subject: community/scanssh: fix build with gcc 14 --- community/scanssh/APKBUILD | 7 +++++-- community/scanssh/gcc14.patch | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 community/scanssh/gcc14.patch diff --git a/community/scanssh/APKBUILD b/community/scanssh/APKBUILD index d6938778503..40b2cd68e46 100644 --- a/community/scanssh/APKBUILD +++ b/community/scanssh/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: fossdd pkgname=scanssh pkgver=2.1.3.1 -pkgrel=2 +pkgrel=3 pkgdesc="Fast SSH server and open proxy scanner" url="https://github.com/ofalk/scanssh" arch="all" @@ -10,7 +10,9 @@ license="BSD-3-Clause" options="!check" # no testsuite makedepends="autoconf automake libpcap-dev libevent-dev libdnet-dev" subpackages="$pkgname-doc" -source="$pkgname-$pkgver.tar.gz::https://github.com/ofalk/scanssh/archive/$pkgver.tar.gz" +source="$pkgname-$pkgver.tar.gz::https://github.com/ofalk/scanssh/archive/$pkgver.tar.gz + gcc14.patch + " prepare() { default_prepare @@ -33,4 +35,5 @@ package() { sha512sums=" 970cbb03aa44fcef62aa03132335e6ecedb083cee98a360b3d781efc8c2d3c169f70c17837b1faaf9ceaa2691a7c619174a9bb185146af50188eaceda5d14adb scanssh-2.1.3.1.tar.gz +72b136f29ce041a7111be2896a5471469eab90c8c8fdfd4eb05fd294796afd9804adc3dc07c894a559cbf16679184ce00b713b0394e9a9a399b587d7f6daa231 gcc14.patch " diff --git a/community/scanssh/gcc14.patch b/community/scanssh/gcc14.patch new file mode 100644 index 00000000000..543786e786d --- /dev/null +++ b/community/scanssh/gcc14.patch @@ -0,0 +1,20 @@ +Fix -Wimplicit-function-declaration error with gcc 14. + +Error: + +``` +arc4random.c:19:25: error: implicit declaration of function 'time' +[-Wimplicit-function-declaration] + 19 | srandom(time(NULL)); + | ^~~~ +``` + +--- scanssh-2.1.3.1-origin/arc4random.c ++++ scanssh-2.1.3.1/arc4random.c +@@ -1,5 +1,6 @@ + #include + #include ++#include + + #include "config.h" + -- cgit v1.2.3