---
configure.ac | 1 +
src/guestfs-internal-frontend.h | 2 ++
2 files changed, 3 insertions(+)
diff --git a/configure.ac b/configure.ac
index a2fb99e..0f7f97e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -315,6 +315,7 @@ AC_CHECK_FUNCS([\
be32toh \
fsync \
futimens \
+ getprogname \
getxattr \
htonl \
htons \
diff --git a/src/guestfs-internal-frontend.h b/src/guestfs-internal-frontend.h
index 2b9070b..d496655 100644
--- a/src/guestfs-internal-frontend.h
+++ b/src/guestfs-internal-frontend.h
@@ -133,6 +133,8 @@ extern void guestfs___cleanup_pclose (void *ptr);
*/
#if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME == 1
# define guestfs___program_name program_invocation_short_name
+#elif HAVE_GETPROGNAME
+# define guestfs___program_name getprogname()
#else
# define guestfs___program_name "libguestfs"
#endif
--
1.9.3