Bugzilla – Bug 509
[1.7.7] conflicting errno definitions due to header misordering in alias.c
Last modified: 2011-10-22 19:43:57 MDT
Created attachment 315 [details] reorder includes in alias.c This commit http://www.sudo.ws/repos/sudo/rev/c2fa4faa8abf includes <errno.h> in alias.c, but only after "sudo.h". the latter has a conditional definition for errno (extern int) which conflicts with the system definition on DragonFly BSD (extern __thread int). errno probably shouldn't be defined outside of errno.h, but the attached include reordering in alias.c at least alleviates this issue.
also see http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=45280
Thanks, I've checked in the fix for that typo in the sudo 1.7 and 1.8 branches. The errno declaration is only needed on obsolete systems where errno is not declared for you. I will add a configure check instead of declaring it unilaterally in sudo.h.
The next version of sudo will include a check for an errno declaration in errno.h
Sudo 1.7.8 and 1.8.3 are out now which have this fixed.