projects
/
cascardo
/
ovs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cbf414e
)
socket-util: getsockopt for Windows.
author
Gurucharan Shetty
<gshetty@nicira.com>
Wed, 19 Feb 2014 17:11:04 +0000
(09:11 -0800)
committer
Gurucharan Shetty
<gshetty@nicira.com>
Fri, 21 Feb 2014 16:20:38 +0000
(08:20 -0800)
Windows defines the 'optval' argument as char * instead of void *.
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
lib/socket-util.h
patch
|
blob
|
history
diff --git
a/lib/socket-util.h
b/lib/socket-util.h
index
d2bd109
..
126f730
100644
(file)
--- a/
lib/socket-util.h
+++ b/
lib/socket-util.h
@@
-98,6
+98,14
@@
static inline int rpl_setsockopt(int sock, int level, int optname,
{
return (setsockopt)(sock, level, optname, optval, optlen);
}
+
+#define getsockopt(sock, level, optname, optval, optlen) \
+ rpl_getsockopt(sock, level, optname, optval, optlen)
+static inline int rpl_getsockopt(int sock, int level, int optname,
+ void *optval, socklen_t *optlen)
+{
+ return (getsockopt)(sock, level, optname, optval, optlen);
+}
#endif
/* In Windows platform, errno is not set for socket calls.