From fe0dbccbc5ef57cc06335e1575c14957561e3631 Mon Sep 17 00:00:00 2001 From: Ralf Ramsauer Date: Sat, 11 Mar 2017 01:41:17 -0800 Subject: [PATCH] iodine/iodined: get rid of redundant local __progname definition Signed-off-by: Ralf Ramsauer --- src/iodine.c | 4 ++-- src/iodined.c | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/iodine.c b/src/iodine.c index 9036cab..e0656ab 100644 --- a/src/iodine.c +++ b/src/iodine.c @@ -49,6 +49,8 @@ WSADATA wsa_data; #if !defined(BSD) && !defined(__GLIBC__) static char *__progname; +#else +extern char *__progname; #endif #define PASSWORD_ENV_VAR "IODINE_PASS" @@ -68,8 +70,6 @@ static inline void help(bool verbose) __attribute__((noreturn)); static void help(bool verbose) { - extern char *__progname; - fprintf(stderr, "iodine IP over DNS tunneling client\n"); fprintf(stderr, "Usage: %s [-v] [-h] [-f] [-r] [-u user] [-t chrootdir] [-d device] " "[-P password] [-m maxfragsize] [-M maxlen] [-T type] [-O enc] [-L 0|1] [-I sec] " diff --git a/src/iodined.c b/src/iodined.c index 8a885d9..d7a0fca 100644 --- a/src/iodined.c +++ b/src/iodined.c @@ -105,6 +105,8 @@ static int debug; #if !defined(BSD) && !defined(__GLIBC__) static char *__progname; +#else +extern char *__progname; #endif /* Struct with IPv4 and IPv6 file descriptors. @@ -2288,8 +2290,6 @@ write_dns(int fd, struct query *q, char *data, int datalen, char downenc) static void print_usage() { - extern char *__progname; - fprintf(stderr, "Usage: %s [-v] [-h] " "[-4] [-6] [-c] [-s] [-f] [-D] [-u user] " "[-t chrootdir] [-d device] [-m mtu] [-z context] " @@ -2368,7 +2368,6 @@ prepare_dns_fd(int fd) int main(int argc, char **argv) { - extern char *__progname; char *listen_ip4; char *listen_ip6; char *errormsg;