From: Roy Marples Date: Fri, 25 Apr 2008 11:01:02 +0000 (+0000) Subject: Fix compile with commandline compat. X-Git-Tag: v4.0.2~450 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1410db936a726946228a8135c446bc1bb4ae4369;p=thirdparty%2Fdhcpcd.git Fix compile with commandline compat. --- diff --git a/config.h b/config.h index 9e361979..d978a5d6 100644 --- a/config.h +++ b/config.h @@ -46,7 +46,6 @@ /* #define THERE_IS_NO_FORK */ /* Packname name and pathname definitions. */ - #define PACKAGE "dhcpcd" #ifndef SYSCONFDIR diff --git a/dhcpcd.c b/dhcpcd.c index 36cefe37..f1f7f667 100644 --- a/dhcpcd.c +++ b/dhcpcd.c @@ -103,7 +103,7 @@ char **dhcpcd_argv = NULL; int dhcpcd_argc = 0; char *dhcpcd_skiproutes = NULL; #define EXTRA_OPTS "XZ:" -#elif CMDLINE_COMAPT +#elif defined(CMDLINE_COMPAT) # define EXTRA_OPTS "NRSY" #endif @@ -341,7 +341,7 @@ parse_config_line(const char *opt, char *line, struct options *options) if (longopts[i].has_arg == required_argument && !line) { fprintf(stderr, - "dhcpcd: option requires an argument -- %s\n", + PACKAGE ": option requires an argument -- %s\n", opt); return -1; } @@ -349,7 +349,7 @@ parse_config_line(const char *opt, char *line, struct options *options) return parse_option(longopts[i].val, line, options); } - fprintf(stderr, "dhcpcd: unknown option -- %s\n", opt); + fprintf(stderr, PACKAGE ": unknown option -- %s\n", opt); return -1; } @@ -600,7 +600,7 @@ main(int argc, char **argv) del_reqmask(options->reqmask, DHCP_DNSSEARCH); break; case 'S': - add_mask(options->requmask, DHCP_MSCR); + add_reqmask(options->reqmask, DHCP_MSCSR); break; case 'Y': del_reqmask(options->reqmask, DHCP_NISSERVER);