diff options
author | Craig Small <csmall@dropbear.xyz> | 2023-05-07 11:10:17 +1000 |
---|---|---|
committer | Craig Small <csmall@dropbear.xyz> | 2023-05-07 20:27:50 +1000 |
commit | c8afe6ff845e3bed9abf83fe818503278373b344 (patch) | |
tree | b7154f395cbe3f3a36aaebcc781b3358a2600240 /configure.ac | |
parent | 786335b9673f9c3af0b3897799b30b205e99748a (diff) | |
download | procps-ng-c8afe6ff845e3bed9abf83fe818503278373b344.tar.gz |
w: Fix musl UT_HOSTSIZE issue
While musl has utmpx.h, their header file does not define all the
values, especially __UT_HOSTSIZE and friends. Instead it just
hard codes the sizes :/
This change will look for that definition specifically and if
not found will include utmp.h too. Checked on Alpine 3.17
musl just makes these a stub so w doesn't work anyway.
Signed-off-by: Craig Small <csmall@dropbear.xyz>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 10 |
1 files changed, 10 insertions, 0 deletions
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 |