summaryrefslogtreecommitdiffstats
path: root/compat
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2016-05-27 20:11:32 +0100
committerThomas Adam <thomas@xteddy.org>2016-05-27 20:11:32 +0100
commitc10d83b4df2d4beb709f2779cab6bbafa957ce09 (patch)
treebae9364c4e5643cfbebb01ecc6b05bb2fddcee04 /compat
parenta2e0db67cca4f489b5d1dc6aeafbbf8d746c4fde (diff)
__progname -> getprogname()
Fix fallout from recent use of getprogname(), which deprecates __progname.
Diffstat (limited to 'compat')
-rw-r--r--compat/getopt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/compat/getopt.c b/compat/getopt.c
index 9cd3b3d2..97f6c7b1 100644
--- a/compat/getopt.c
+++ b/compat/getopt.c
@@ -84,7 +84,8 @@ BSDgetopt(int nargc, char *const *nargv, const char *ostr)
++BSDoptind;
if (BSDopterr && *ostr != ':')
(void)fprintf(stderr,
- "%s: unknown option -- %c\n", __progname, BSDoptopt);
+ "%s: unknown option -- %c\n", getprogname(),
+ BSDoptopt);
return (BADCH);
}
if (*++oli != ':') { /* don't need argument */
@@ -102,7 +103,7 @@ BSDgetopt(int nargc, char *const *nargv, const char *ostr)
if (BSDopterr)
(void)fprintf(stderr,
"%s: option requires an argument -- %c\n",
- __progname, BSDoptopt);
+ getprogname(), BSDoptopt);
return (BADCH);
}
else /* white space */