Menu

#22 [PATCH] fails to build with musl libc due to use of non-standard unsigned

v1.0 (example)
open
nobody
None
5
2014-08-25
2014-03-03
No

The use of the non-standard u_char, u_short and u_int types makes build fail on musl libc, which is kinda strict when it comes to standards.

Error message:

ccache gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I..   -Os -fomit-frame-pointer  -Os -
fomit-frame-pointer -MT udpsock.o -MD -MP -MF .deps/udpsock.Tpo -c -o udpsock.o 
udpsock.c
In file included from igmpproxy.h:58:0,
                 from confread.c:45:
os.h:7:1: error: unknown type name 'u_short'
 static inline u_short ip_data_len(const struct ip *ip)
 ^
os.h:12:46: error: unknown type name 'u_short'
 static inline void ip_set_len(struct ip *ip, u_short len)
                                              ^
Makefile:279: recipe for target 'confread.o' failed
make[2]: *** [confread.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from igmpproxy.h:58:0,
                 from lib.c:34:
os.h:7:1: error: unknown type name 'u_short'
 static inline u_short ip_data_len(const struct ip *ip)
 ^
os.h:12:46: error: unknown type name 'u_short'
 static inline void ip_set_len(struct ip *ip, u_short len)
                                              ^

See also: http://stackoverflow.com/questions/1918934/is-u-char-a-standard

1 Attachments

Discussion


Log in to post a comment.