summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac1
-rw-r--r--misc-utils/getopt.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 7efe5e501..8a4a9311f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -380,6 +380,7 @@ AC_CHECK_FUNCS([ \
qsort_r \
rpmatch \
scandirat \
+ setprogname \
setresgid \
setresuid \
sched_setattr \
diff --git a/misc-utils/getopt.c b/misc-utils/getopt.c
index c4144f63e..2cff2eb85 100644
--- a/misc-utils/getopt.c
+++ b/misc-utils/getopt.c
@@ -453,7 +453,7 @@ int main(int argc, char *argv[])
if (name) {
argv[optind - 1] = name;
-#if defined (BSD) || defined (__APPLE__)
+#if defined (HAVE_SETPROGNAME) && !defined (__linux__)
setprogname(name);
#endif
} else