X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Ftincd.c;h=db18dc576cce9e4f7a68c8f3fded6eb466ce96bd;hp=a2b358052f7f17c072399ebc35e17ab344dc17bd;hb=c40c99592b9512049e85323c59432a380239151f;hpb=013bd456084337974aa0b7f2af49e3d9d1afc74c diff --git a/src/tincd.c b/src/tincd.c index a2b35805..db18dc57 100644 --- a/src/tincd.c +++ b/src/tincd.c @@ -49,7 +49,12 @@ #include #endif +#ifdef HAVE_GETOPT_LONG #include +#else +#include "getopt.h" +#endif + #include "pidfile.h" #include "conf.h" @@ -239,7 +244,8 @@ static bool parse_options(int argc, char **argv) { usage(true); return false; } - netname = strcmp(optarg, ".") != 0 ? xstrdup(optarg) : NULL; + if(optarg && strcmp(optarg, ".")) + netname = xstrdup(optarg); break; case 'o': /* option */