Bugzilla – Bug 968
S_ISFIFO redefined
Last modified: 2021-09-11 15:54:38 MDT
Created attachment 554 [details] patch I found the macros S_ISFIFO, S_ISDIR, S_ISREG, S_ISLNK are being redefined in the sudo build: Warning: Macro redefinition Macro redefinition [macro-redefinition]: 'S_ISDIR' macro redefined at line 395 of /usr/include/sys/stat.h. previous definition is at line 167 of /builds/pheimlic/sudo19/components/sudo/sudo-1.9.5p2/include/sudo_compat.h The attached patch fixes it for me. This is on Solaris 11.4 with sudo 1.9.5p2
I was unable to reproduce that problem on Solaris 11.4 with either gcc version 7.3.0 or developer studio 12.6. However, I don't think those compatibility macros are actually needed any more. They date from a time when I couldn't assume a POSIX system. The following commit removes them: https://www.sudo.ws/repos/sudo/rev/d10d0b9b60e1
Closing since those macros were removed in sudo 1.9.6.