diff --git a/plugins/sudoers/regress/iolog_path/check_iolog_path.c b/plugins/sudoers/regress/iolog_path/check_iolog_path.c index cef22ffab..036d86a71 100644 --- a/plugins/sudoers/regress/iolog_path/check_iolog_path.c +++ b/plugins/sudoers/regress/iolog_path/check_iolog_path.c @@ -105,6 +105,10 @@ main(int argc, char *argv[]) int errors = 0; int tests = 0; +#if !defined(HAVE_GETPROGNAME) && !defined(HAVE___PROGNAME) + setprogname(argc > 0 ? argv[0] : "check_iolog_path"); +#endif + if (argc != 2) usage(); diff --git a/plugins/sudoers/regress/logging/check_wrap.c b/plugins/sudoers/regress/logging/check_wrap.c index 2b904d929..33d7b9ddd 100644 --- a/plugins/sudoers/regress/logging/check_wrap.c +++ b/plugins/sudoers/regress/logging/check_wrap.c @@ -56,6 +56,10 @@ main(int argc, char *argv[]) char *cp, *dash, *line, lines[2][2048]; int which = 0; +#if !defined(HAVE_GETPROGNAME) && !defined(HAVE___PROGNAME) + setprogname(argc > 0 ? argv[0] : "check_wrap"); +#endif + if (argc != 2) usage(); diff --git a/plugins/sudoers/regress/parser/check_addr.c b/plugins/sudoers/regress/parser/check_addr.c index 65f7099bc..b96dec63b 100644 --- a/plugins/sudoers/regress/parser/check_addr.c +++ b/plugins/sudoers/regress/parser/check_addr.c @@ -92,6 +92,10 @@ main(int argc, char *argv[]) size_t len; FILE *fp; +#if !defined(HAVE_GETPROGNAME) && !defined(HAVE___PROGNAME) + setprogname(argc > 0 ? argv[0] : "check_addr"); +#endif + if (argc != 2) usage();