X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;ds=sidebyside;f=src%2Ftincd.c;h=db18dc576cce9e4f7a68c8f3fded6eb466ce96bd;hb=ecffb339c8670e3326f64eeb879ef4704152edf3;hp=a2b358052f7f17c072399ebc35e17ab344dc17bd;hpb=013bd456084337974aa0b7f2af49e3d9d1afc74c;p=tinc 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 */