Bugzilla – Bug 1021
fails to build on Debian kFreeBSD
Last modified: 2022-03-04 09:15:14 MST
Hi, sudo 1.9.9 fails to build on Debian/kFreeBSD. Sadly, the original bug reporter didn't give a build log, but says that the following patch fixes things: --- sudo-1.9.9.orig/include/sudo_compat.h +++ sudo-1.9.9/include/sudo_compat.h @@ -471,7 +471,7 @@ sudo_dso_public time_t sudo_timegm(struc #ifndef HAVE_UTIMENSAT sudo_dso_public int sudo_utimensat(int fd, const char *file, const struct timespec *times, int flag); # undef utimensat -# define utimensat(_a, _b, _c, _d) sudo_utimensat((_a), (_b), (_c), (_d)) +# define utimensat(_a, _b, _c, _d) sudo_utimensat(_a, _b, _c, _d) #endif /* HAVE_UTIMENSAT */ #ifndef HAVE_FCHMODAT sudo_dso_public int sudo_fchmodat(int dfd, const char *path, mode_t mode, int flag); @@ -486,7 +486,7 @@ sudo_dso_public int sudo_fstatat(int dfd #ifndef HAVE_FUTIMENS sudo_dso_public int sudo_futimens(int fd, const struct timespec *times); # undef futimens -# define futimens(_a, _b) sudo_futimens((_a), (_b)) +# define futimens(_a, _b) sudo_futimens(_a, _b) #endif /* HAVE_FUTIMENS */ #if !defined(HAVE_SNPRINTF) || defined(PREFER_PORTABLE_SNPRINTF) sudo_dso_public int sudo_snprintf(char *str, size_t n, char const *fmt, ...) __printflike(3, 4); Greetings Marc (btw, 1.9.9 is not yet selectablein the "Version" list)
The actual problem is that the Debian kFreeBSD include files include prototypes for the missing functions which are conflicting with sudo's defines that attempt to emulate them. I don't think that removing the parens is the correct solution. Those prototypes really should not be present if the underlying functions are not supported but it looks like including sys/stat.h in sudo_compat.h is enough to avoid the problem.
Fixed by https://www.sudo.ws/repos/sudo/rev/10775e14164a
Fixed in sudo 1.9.10