diff options
author | psykose <alice@ayaya.dev> | 2023-04-19 18:55:39 +0000 |
---|---|---|
committer | psykose <alice@ayaya.dev> | 2023-04-19 20:55:39 +0200 |
commit | c31e5ad87ae6a3b0bb4d9a996d8887f1b5d89659 (patch) | |
tree | 18d2cd7fc5d4e9a3b25633ef1d5414193c4a88d0 | |
parent | f3a3371b7a11d6335e14b215b2828af2adc465fc (diff) | |
download | aports-c31e5ad87ae6a3b0bb4d9a996d8887f1b5d89659.zip |
main/iftop: fix werror=format-security
-rw-r--r-- | main/iftop/APKBUILD | 7 | ||||
-rw-r--r-- | main/iftop/format-security.patch | 52 |
2 files changed, 57 insertions, 2 deletions
diff --git a/main/iftop/APKBUILD b/main/iftop/APKBUILD index 2affad9d824..d4bbcbe914a 100644 --- a/main/iftop/APKBUILD +++ b/main/iftop/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=iftop pkgver=0.17 -pkgrel=10 +pkgrel=11 pkgdesc="A tool to display bandwidth usage on an interface" url="https://www.ex-parrot.com/~pdw/iftop/" arch="all" @@ -9,7 +9,9 @@ license="GPL-2.0-or-later" makedepends="libpcap-dev>=1 ncurses-dev" options="!check" # no tests subpackages="$pkgname-doc" -source="https://www.ex-parrot.com/~pdw/iftop/download/iftop-$pkgver.tar.gz" +source="https://www.ex-parrot.com/~pdw/iftop/download/iftop-$pkgver.tar.gz + format-security.patch + " prepare() { default_prepare @@ -31,4 +33,5 @@ package() { sha512sums=" 41e3bc5feac5927f67356f491fcab7a28f7a32102cc33c67d81c1dc755273c42e32b540b14b6254a540f1b6c1b1ad6c50e3095c3b5282db2ea12dd0049ce2ebd iftop-0.17.tar.gz +ab478e521c6b460766a8149786c59a3e977f9c44d1b880476baa0c7851a1c6bbf1e998051a25e63aafaf21e629d64cf3336b909c683f8604ffa922ee9e25cd4b format-security.patch " diff --git a/main/iftop/format-security.patch b/main/iftop/format-security.patch new file mode 100644 index 00000000000..41156751aa9 --- /dev/null +++ b/main/iftop/format-security.patch @@ -0,0 +1,52 @@ +also fixes implicit function decls +-- +diff --git a/cfgfile.c b/cfgfile.c +index 442316c..6637bd1 100644 +--- a/cfgfile.c ++++ b/cfgfile.c +@@ -7,6 +7,7 @@ + + #include <stdio.h> + #include <string.h> ++#include <stdlib.h> + #include <errno.h> + + #include "stringmap.h" +diff --git a/iftop.c b/iftop.c +index 5a7b41e..a08e8cd 100644 +--- a/iftop.c ++++ b/iftop.c +@@ -46,6 +46,10 @@ + #include "ppp.h" + + ++void options_read_args(int argc, char **argv); ++void options_make(void); ++int get_addrs_ioctl(char *interface, char if_hw_addr[], struct in_addr *if_ip_addr); ++ + /* ethernet address of interface. */ + int have_hw_addr = 0; + unsigned char if_hw_addr[6]; +diff --git a/options.c b/options.c +index 8f385de..a9aac5e 100644 +--- a/options.c ++++ b/options.c +@@ -28,6 +28,9 @@ + # define inet_aton(a, b) inet_pton(AF_INET, (a), (b)) + #endif + ++void config_set_string(const char *directive, const char* s); ++int config_get_enum(const char *directive, config_enumeration_type *enumeration, int *value); ++ + options_t options; + + char optstr[] = "+i:f:nNF:hpbBPm:c:"; +@@ -159,7 +162,7 @@ void options_set_defaults() { + } + + static void die(char *msg) { +- fprintf(stderr, msg); ++ fprintf(stderr, "%s", msg); + exit(1); + } + |