Bugzilla – Bug 465
Fix for build failure on GNU/Hurd
Last modified: 2011-03-03 09:51:50 MST
Svante Signell provided the following fix for build failures in the Debian Hurd project. I've folded this in to my Debian package builds for now, would be great if you can include this in a future release of sudo. Bdale When building from source on GNU/Hurd the macro HAVE_GETUTID is defined but not on GNU/Linux, making the Hurd build fail. The problem is that <utmp.h> is included after the include of "compat.h" when HAVE_GETUTID is defined. Moving the include higher up solves this problem, see the inlined patch. cat fix_sudo_hurd_source_build.diff --- boottime.c.orig 2011-01-27 19:10:11.000000000 +0100 +++ boottime.c 2011-01-27 19:11:49.000000000 +0100 @@ -47,6 +47,14 @@ # include <sys/sysctl.h> #endif +/* Must be included above "compat.h"!! */ +#if defined(HAVE_GETUTXID) +#include <utmpx.h> +#elif defined(HAVE_GETUTID) +#include <utmp.h> +#else +#endif + #include "compat.h" #include "missing.h" @@ -102,7 +110,6 @@ #elif defined(HAVE_GETUTXID) -#include <utmpx.h> int get_boottime(tv) struct timeval *tv; @@ -121,7 +128,6 @@ #elif defined(HAVE_GETUTID) -#include <utmp.h> int get_boottime(tv) struct timeval *tv;
Thanks, this will be fixed in sudo 1.7.5.
Fixed in sudo 1.7.5 and 1.8.0.