mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-20 17:52:52 +00:00
Fix narrowing issues reported by gcc-4.7
This commit is contained in:
parent
b45242c50f
commit
940a5f1144
@ -127,7 +127,7 @@ inline int lx_umount(char const *target)
|
||||
|
||||
inline int lx_socket(int domain, int type, int protocol)
|
||||
{
|
||||
unsigned long args[3] = { domain, type, protocol };
|
||||
long args[3] = { domain, type, protocol };
|
||||
return lx_socketcall(SYS_SOCKET, args);
|
||||
}
|
||||
|
||||
@ -135,7 +135,7 @@ inline int lx_socket(int domain, int type, int protocol)
|
||||
inline int lx_bind(int sockfd, const struct sockaddr *addr,
|
||||
socklen_t addrlen)
|
||||
{
|
||||
unsigned long args[3] = { sockfd, (unsigned long)addr, addrlen };
|
||||
long args[3] = { sockfd, (long)addr, (long)addrlen };
|
||||
return lx_socketcall(SYS_BIND, args);
|
||||
}
|
||||
|
||||
@ -143,7 +143,7 @@ inline int lx_bind(int sockfd, const struct sockaddr *addr,
|
||||
inline int lx_connect(int sockfd, const struct sockaddr *serv_addr,
|
||||
socklen_t addrlen)
|
||||
{
|
||||
unsigned long args[3] = { sockfd, (unsigned long)serv_addr, addrlen };
|
||||
long args[3] = { sockfd, (long)serv_addr, (long)addrlen };
|
||||
return lx_socketcall(SYS_CONNECT, args);
|
||||
}
|
||||
|
||||
|
@ -98,7 +98,7 @@ inline int lx_dup2(int fd, int to)
|
||||
|
||||
#ifdef SYS_socketcall
|
||||
|
||||
inline int lx_socketcall(int call, unsigned long *args)
|
||||
inline int lx_socketcall(int call, long *args)
|
||||
{
|
||||
int res = lx_syscall(SYS_socketcall, call, args);
|
||||
return res;
|
||||
@ -106,28 +106,28 @@ inline int lx_socketcall(int call, unsigned long *args)
|
||||
|
||||
inline int lx_socketpair(int domain, int type, int protocol, int sd[2])
|
||||
{
|
||||
unsigned long args[4] = { domain, type, protocol, (unsigned long)sd };
|
||||
long args[4] = { domain, type, protocol, (long)sd };
|
||||
return lx_socketcall(SYS_SOCKETPAIR, args);
|
||||
}
|
||||
|
||||
|
||||
inline int lx_sendmsg(int sockfd, const struct msghdr *msg, int flags)
|
||||
{
|
||||
unsigned long args[3] = { sockfd, (unsigned long)msg, flags };
|
||||
long args[3] = { sockfd, (long)msg, flags };
|
||||
return lx_socketcall(SYS_SENDMSG, args);
|
||||
}
|
||||
|
||||
|
||||
inline int lx_recvmsg(int sockfd, struct msghdr *msg, int flags)
|
||||
{
|
||||
unsigned long args[3] = { sockfd, (unsigned long)msg, flags };
|
||||
long args[3] = { sockfd, (long)msg, flags };
|
||||
return lx_socketcall(SYS_RECVMSG, args);
|
||||
}
|
||||
|
||||
|
||||
inline int lx_getpeername(int sockfd, struct sockaddr *name, socklen_t *namelen)
|
||||
{
|
||||
unsigned long args[3] = { sockfd, (unsigned long)name, (unsigned long)namelen };
|
||||
long args[3] = { sockfd, (long)name, (long)namelen };
|
||||
return lx_socketcall(SYS_GETPEERNAME, args);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user