iodine/iodined: get rid of redundant local __progname definition

Signed-off-by: Ralf Ramsauer <ralf@ramses-pyramidenbau.de>
This commit is contained in:
Ralf Ramsauer 2017-03-11 01:41:17 -08:00
parent 2efa4dfb35
commit fe0dbccbc5
2 changed files with 4 additions and 5 deletions

View File

@ -49,6 +49,8 @@ WSADATA wsa_data;
#if !defined(BSD) && !defined(__GLIBC__) #if !defined(BSD) && !defined(__GLIBC__)
static char *__progname; static char *__progname;
#else
extern char *__progname;
#endif #endif
#define PASSWORD_ENV_VAR "IODINE_PASS" #define PASSWORD_ENV_VAR "IODINE_PASS"
@ -68,8 +70,6 @@ static inline void help(bool verbose) __attribute__((noreturn));
static void static void
help(bool verbose) { help(bool verbose) {
extern char *__progname;
fprintf(stderr, "iodine IP over DNS tunneling client\n"); fprintf(stderr, "iodine IP over DNS tunneling client\n");
fprintf(stderr, "Usage: %s [-v] [-h] [-f] [-r] [-u user] [-t chrootdir] [-d device] " 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] " "[-P password] [-m maxfragsize] [-M maxlen] [-T type] [-O enc] [-L 0|1] [-I sec] "

View File

@ -105,6 +105,8 @@ static int debug;
#if !defined(BSD) && !defined(__GLIBC__) #if !defined(BSD) && !defined(__GLIBC__)
static char *__progname; static char *__progname;
#else
extern char *__progname;
#endif #endif
/* Struct with IPv4 and IPv6 file descriptors. /* 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 static void
print_usage() { print_usage() {
extern char *__progname;
fprintf(stderr, "Usage: %s [-v] [-h] " fprintf(stderr, "Usage: %s [-v] [-h] "
"[-4] [-6] [-c] [-s] [-f] [-D] [-u user] " "[-4] [-6] [-c] [-s] [-f] [-D] [-u user] "
"[-t chrootdir] [-d device] [-m mtu] [-z context] " "[-t chrootdir] [-d device] [-m mtu] [-z context] "
@ -2368,7 +2368,6 @@ prepare_dns_fd(int fd)
int int
main(int argc, char **argv) main(int argc, char **argv)
{ {
extern char *__progname;
char *listen_ip4; char *listen_ip4;
char *listen_ip6; char *listen_ip6;
char *errormsg; char *errormsg;