From 8a749d44699853f1df894443065dbf794264c8fa Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Sun, 3 Feb 2019 13:45:25 +0100 Subject: blogc: unistd.h wont provide gethostname --- configure.ac | 1 + src/blogc/sysinfo.h | 2 ++ 2 files changed, 3 insertions(+) diff --git a/configure.ac b/configure.ac index 761e37a..865f247 100644 --- a/configure.ac +++ b/configure.ac @@ -221,6 +221,7 @@ BASH="$ac_cv_path_bash" AC_SUBST(BASH) AC_CHECK_HEADERS([sys/resource.h sys/stat.h sys/time.h sys/wait.h time.h unistd.h]) +AC_CHECK_FUNCS([gethostname]) LT_LIB_M diff --git a/src/blogc/sysinfo.h b/src/blogc/sysinfo.h index 51640e0..0104911 100644 --- a/src/blogc/sysinfo.h +++ b/src/blogc/sysinfo.h @@ -14,7 +14,9 @@ #endif /* HAVE_CONFIG_H */ #ifdef HAVE_UNISTD_H +#ifdef HAVE_GETHOSTNAME #define HAVE_SYSINFO_HOSTNAME 1 +#endif /* HAVE_GETHOSTNAME */ #endif /* HAVE_UNISTD_H */ #include "../common/utils.h" -- cgit v1.2.3-18-g5258