diff -ur samba-3.0.25b/source/configure.in samba-3.0.25b_utmpx/source/configure.in --- samba-3.0.25b/source/configure.in Wed May 23 11:29:20 2007 +++ samba-3.0.25b_utmpx/source/configure.in Mon Jul 9 10:58:38 2007 @@ -2330,6 +2330,15 @@ AC_DEFINE(HAVE_UX_UT_SYSLEN,1,[Whether the utmpx struct has a property ut_syslen]) fi +AC_CACHE_CHECK([for ut_host in utmpx],samba_cv_HAVE_UX_UT_HOST,[ +AC_TRY_COMPILE([#include +#include ], +[struct utmpx ux; ux.ut_host[0] = 'a';], +samba_cv_HAVE_UX_UT_HOST=yes,samba_cv_HAVE_UX_UT_HOST=no,samba_cv_HAVE_UX_UT_HOST=cross)]) +if test x"$samba_cv_HAVE_UX_UT_HOST" = x"yes"; then + AC_DEFINE(HAVE_UX_UT_HOST,1,[Whether the utmpx struct has a property ut_host]) +fi + fi # end utmp details diff -ur samba-3.0.25b/source/include/config.h.in samba-3.0.25b_utmpx/source/include/config.h.in --- samba-3.0.25b/source/include/config.h.in Tue Jun 26 15:35:51 2007 +++ samba-3.0.25b_utmpx/source/include/config.h.in Mon Jul 9 10:58:38 2007 @@ -1901,6 +1901,9 @@ /* Whether the utmpx struct has a property ut_syslen */ #undef HAVE_UX_UT_SYSLEN +/* Whether the utmpx struct has a property ut_host */ +#undef HAVE_UX_UT_HOST + /* Define to 1 if you have the header file. */ #undef HAVE_VALGRIND_H diff -ur samba-3.0.25b/source/smbd/utmp.c samba-3.0.25b_utmpx/source/smbd/utmp.c --- samba-3.0.25b/source/smbd/utmp.c Fri Feb 25 12:59:26 2005 +++ samba-3.0.25b_utmpx/source/smbd/utmp.c Mon Jul 9 10:58:38 2007 @@ -410,7 +410,7 @@ else ux.ut_syslen = 0; #endif -#if defined(HAVE_UT_UT_HOST) +#if defined(HAVE_UX_UT_HOST) utmp_strcpy(ux.ut_host, hostname, sizeof(ux.ut_host)); #endif