maximilian attems
2011-Aug-29 13:42 UTC
[klibc] [PATCH] include: [sys/socket.h] Fix bind and connect attributes
Noticed while compiling some util-linux stuff: gen_uuid.c:507:21: warning: passing argument 2 of 'connect' discards 'const' qualifier from pointer target type [enabled by default] /usr/lib/klibc/include/sys/socket.h:248:14: note: expected 'struct sockaddr *' but argument is of type 'const struct sockaddr *' Signed-off-by: maximilian attems <max at stro.at> --- usr/include/sys/socket.h | 4 ++-- usr/klibc/SOCKETCALLS.def | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/usr/include/sys/socket.h b/usr/include/sys/socket.h index fbc7711..38cfef6 100644 --- a/usr/include/sys/socket.h +++ b/usr/include/sys/socket.h @@ -244,8 +244,8 @@ struct ucred { __extern int socket(int, int, int); -__extern int bind(int, struct sockaddr *, int); -__extern int connect(int, struct sockaddr *, socklen_t); +__extern int bind(int, const struct sockaddr *, int); +__extern int connect(int, const struct sockaddr *, socklen_t); __extern int listen(int, int); __extern int accept(int, struct sockaddr *, socklen_t *); __extern int getsockname(int, struct sockaddr *, socklen_t *); diff --git a/usr/klibc/SOCKETCALLS.def b/usr/klibc/SOCKETCALLS.def index 70d478f..39f7db5 100644 --- a/usr/klibc/SOCKETCALLS.def +++ b/usr/klibc/SOCKETCALLS.def @@ -5,8 +5,8 @@ * SYSCALLS.def. */ <?> int socket(int, int, int); -<?> int bind(int, struct sockaddr *, int); -<?> int connect(int, struct sockaddr *, socklen_t); +<?> int bind(int, const struct sockaddr *, int); +<?> int connect(int, const struct sockaddr *, socklen_t); <?> int listen(int, int); <?> int accept(int, struct sockaddr *, socklen_t *); <?> int getsockname(int, struct sockaddr *, socklen_t *); -- 1.7.5.4