[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[UNIKRAFT/LWIP PATCH 3/4] include/sys/socket.h: Correct prototype definitions



From: Alexander Jung <alexander.jung@xxxxxxxxx>

LwIP can provide the `sys/socket.h` header file but it must be
POSIX compliant.  This commit corrects the prototype definitions.

Signed-off-by: Alexander Jung <alexander.jung@xxxxxxxxx>
---
 include/sys/socket.h | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/include/sys/socket.h b/include/sys/socket.h
index 8007cb8..edc0bc4 100644
--- a/include/sys/socket.h
+++ b/include/sys/socket.h
@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: BSD-3-Clause */
 /*
- * Copyright (c) 2019, NEC Laboratories Europe GmbH, NEC Corporation.
+ * Copyright (c) 2020, NEC Laboratories Europe GmbH, NEC Corporation.
  *                     All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -91,13 +91,13 @@ int setsockopt(int s, int level, int optname, const void 
*optval,
               socklen_t optlen);
 int connect(int s, const struct sockaddr *name, socklen_t namelen);
 int listen(int s, int backlog);
-int recv(int s, void *mem, size_t len, int flags);
-int recvfrom(int s, void *mem, size_t len, int flags,
+ssize_t recv(int s, void *mem, size_t len, int flags);
+ssize_t recvfrom(int s, void *mem, size_t len, int flags,
             struct sockaddr *from, socklen_t *fromlen);
-int recvmsg(int s, struct msghdr *msg, int flags);
-int send(int s, const void *dataptr, size_t size, int flags);
-int sendmsg(int s, const struct msghdr *message, int flags);
-int sendto(int s, const void *dataptr, size_t size, int flags,
+ssize_t recvmsg(int s, struct msghdr *msg, int flags);
+ssize_t send(int s, const void *dataptr, size_t size, int flags);
+ssize_t sendmsg(int s, const struct msghdr *message, int flags);
+ssize_t sendto(int s, const void *dataptr, size_t size, int flags,
           const struct sockaddr *to, socklen_t tolen);
 int socketpair(int domain, int type, int protocol, int sv[2]);
 
-- 
2.20.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.