Bug 711 - Build error with musl C library
Build error with musl C library
Status: RESOLVED FIXED
Product: Sudo
Classification: Unclassified
Component: Packaging
1.8.14
PC Linux
: low normal
Assigned To: Todd C. Miller
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-01 01:34 MDT by Jörg Krause
Modified: 2015-11-01 15:27 MST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jörg Krause 2015-08-01 01:34:21 MDT
The musl C library is very strict with header includes. In sudo_util.h id_t is used so <sys/types.h> has to be included.

This is the error message if <sys/types.h> is NOT included in sudo_util.h:

In file included from ./sudo.h:39:0,
                 from ./preserve_fds.c:32:
../include/sudo_util.h:220:14: error: unknown type name 'id_t'
 __dso_public id_t sudo_strtoid_v1(const char *str, const char *sep, char **endp, const char **errstr);
              ^
Makefile:329: recipe for target 'preserve_fds.o' failed
Comment 1 Todd C. Miller 2015-08-02 20:00:40 MDT
Fixed in http://www.sudo.ws/repos/sudo/rev/fda95d9ca1e9
Comment 2 Todd C. Miller 2015-08-03 09:43:20 MDT
Verified working on Alpine Linux with musl libc.
Comment 3 Todd C. Miller 2015-11-01 15:27:05 MST
Fixed in sudo 1.8.15