Bug 968 - S_ISFIFO redefined
S_ISFIFO redefined
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Sudo
1.9.5
All Solaris 2.x
: low low
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-03-10 04:36 MST by Pavel Heimlich
Modified: 2021-09-11 15:54 MDT (History)
1 user (show)

See Also:


Attachments
patch (494 bytes, patch)
2021-03-10 04:36 MST, Pavel Heimlich
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Heimlich 2021-03-10 04:36:25 MST
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
Comment 1 Todd C. Miller 2021-03-10 12:53:08 MST
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
Comment 2 Todd C. Miller 2021-03-14 08:40:05 MDT
Closing since those macros were removed in sudo 1.9.6.