Bug #11983
Updated by Toomas Soome over 2 years ago
Build errors with gcc 8:
<pre>
In file included from ../socket/weaks.c:30:
/code/illumos-gate/proto/root_i386/usr/include/sys/socket.h:541:12: error: 'bind' alias between functions of incompatible types 'int(int, const struct sockaddr *, socklen_t)' {aka 'int(int, const struct sockaddr *, unsigned int)'} and 'int(int, struct sockaddr *, int)' [-Werror=attribute-alias]
extern int bind(int, const struct sockaddr *, socklen_t);
^~~~
../socket/weaks.c:82:1: note: aliased declaration here
_bind(int sock, struct sockaddr *addr, int addrlen)
^~~~~
In file included from ../socket/weaks.c:30:
/code/illumos-gate/proto/root_i386/usr/include/sys/socket.h:556:12: error: 'setsockopt' alias between functions of incompatible types 'int(int, int, int, const void *, socklen_t)' {aka 'int(int, int, int, const void *, unsigned int)'} and 'int(int, int, int, char *, int)' [-Werror=attribute-alias]
extern int setsockopt(int, int, int, const void *, socklen_t);
^~~~~~~~~~
../socket/weaks.c:214:1: note: aliased declaration here
_setsockopt(int sock, int level, int optname, char *optval, int optlen)
^~~~~~~~~~~
In file included from ../socket/weaks.c:30:
/code/illumos-gate/proto/root_i386/usr/include/sys/socket.h:554:16: error: 'sendto' alias between functions of incompatible types 'ssize_t(int, const void *, size_t, int, const struct sockaddr *, socklen_t)' {aka 'int(int, const void *, unsigned int, int, const struct sockaddr *, unsigned int)'} and 'int(int, char *, int, int, struct sockaddr *, int *)' [-Werror=attribute-alias]
extern ssize_t sendto(int, const void *, size_t, int, const struct sockaddr *,
^~~~~~
../socket/weaks.c:150:1: note: aliased declaration here
_sendto(int sock, char *buf, int len, int flags,
^~~~~~~
In file included from ../socket/weaks.c:30:
/code/illumos-gate/proto/root_i386/usr/include/sys/socket.h:552:16: error: 'send' alias between functions of incompatible types 'ssize_t(int, const void *, size_t, int)' {aka 'int(int, const void *, unsigned int, int)'} and 'int(int, char *, int, int)' [-Werror=attribute-alias]
extern ssize_t send(int, const void *, size_t, int);
^~~~
../socket/weaks.c:138:1: note: aliased declaration here
_send(int sock, char *buf, int len, int flags)
^~~~~
In file included from ../socket/weaks.c:30:
/code/illumos-gate/proto/root_i386/usr/include/sys/socket.h:549:16: error: 'recvfrom' alias between functions of incompatible types 'ssize_t(int, void *, size_t, int, struct sockaddr *, void *)' {aka 'int(int, void *, unsigned int, int, struct sockaddr *, void *)'} and 'int(int, char *, int, int, struct sockaddr *, int *)' [-Werror=attribute-alias]
extern ssize_t recvfrom(int, void *_RESTRICT_KYWD, size_t, int,
^~~~~~~~
../socket/weaks.c:124:1: note: aliased declaration here
_recvfrom(int sock, char *buf, int len, int flags,
^~~~~~~~~
In file included from ../socket/weaks.c:30:
/code/illumos-gate/proto/root_i386/usr/include/sys/socket.h:548:16: error: 'recv' alias between functions of incompatible types 'ssize_t(int, void *, size_t, int)' {aka 'int(int, void *, unsigned int, int)'} and 'int(int, char *, int, int)' [-Werror=attribute-alias]
extern ssize_t recv(int, void *, size_t, int);
^~~~
../socket/weaks.c:118:1: note: aliased declaration here
_recv(int sock, char *buf, int len, int flags)
^~~~~
In file included from ../socket/weaks.c:30:
/code/illumos-gate/proto/root_i386/usr/include/sys/socket.h:542:12: error: 'connect' alias between functions of incompatible types 'int(int, const struct sockaddr *, socklen_t)' {aka 'int(int, const struct sockaddr *, unsigned int)'} and 'int(int, struct sockaddr *, int)' [-Werror=attribute-alias]
extern int connect(int, const struct sockaddr *, socklen_t);
^~~~~~~
../socket/weaks.c:106:1: note: aliased declaration here
_connect(int sock, struct sockaddr *addr, int addrlen)
^~~~~~~~
cc1: all warnings being treated as errors
</pre>
Testing done: build/install/boot