diff options
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | configure.ac | 10 | ||||
-rw-r--r-- | src/w.c | 5 |
3 files changed, 15 insertions, 1 deletions
@@ -8,6 +8,7 @@ procps-ng-NEXT * top: bad command line arguments yield EXIT_FAILURE issue #273 * top: avoids keystroke induced '%Cpu' distortions * top: includes VM (guest) tics in 'system' overhead issue #274 + * w: Fix musl UT_HOSTSIZE issue procps-ng-4.0.3 --------------- diff --git a/configure.ac b/configure.ac index 629881a..e20a2c5 100644 --- a/configure.ac +++ b/configure.ac @@ -78,6 +78,16 @@ AC_TYPE_SSIZE_T AC_CHECK_MEMBERS([struct stat.st_rdev]) AC_CHECK_MEMBERS([siginfo_t.si_int], [], [], [[#include <signal.h>]]) +dnl Needed for musl +if test "x$ac_cv_header_utmpx_h" = xyes +then : +AC_CHECK_DECLS([__UT_HOSTSIZE], + [AC_DEFINE([HAVE_UT_HOSTSIZE_IN_UTMPX], [1], + [Define if __UT_HOSTSIZE in utmpx.h])], + [], + [[#include <utmpx.h>]]) +fi + dnl libtool LT_INIT @@ -45,7 +45,10 @@ #include <time.h> #include <unistd.h> #ifdef HAVE_UTMPX_H -# include <utmpx.h> +#include <utmpx.h> +#ifndef HAVE_UT_HOSTSIZE_IN_UTMPX +#include <utmp.h> +#endif #else # include <utmp.h> #endif |