git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ofproto-dpif: Use sequence number to wake up main thread for
[sliver-openvswitch.git]
/
lib
/
socket-util.c
diff --git
a/lib/socket-util.c
b/lib/socket-util.c
index
aeda543
..
aa0c719
100644
(file)
--- a/
lib/socket-util.c
+++ b/
lib/socket-util.c
@@
-120,14
+120,22
@@
set_dscp(int fd, uint8_t dscp)
success = false;
val = dscp << 2;
if (setsockopt(fd, IPPROTO_IP, IP_TOS, &val, sizeof val)) {
success = false;
val = dscp << 2;
if (setsockopt(fd, IPPROTO_IP, IP_TOS, &val, sizeof val)) {
+#ifndef _WIN32
if (sock_errno() != ENOPROTOOPT) {
if (sock_errno() != ENOPROTOOPT) {
+#else
+ if (sock_errno() != WSAENOPROTOOPT) {
+#endif
return sock_errno();
}
} else {
success = true;
}
if (setsockopt(fd, IPPROTO_IPV6, IPV6_TCLASS, &val, sizeof val)) {
return sock_errno();
}
} else {
success = true;
}
if (setsockopt(fd, IPPROTO_IPV6, IPV6_TCLASS, &val, sizeof val)) {
+#ifndef _WIN32
if (sock_errno() != ENOPROTOOPT) {
if (sock_errno() != ENOPROTOOPT) {
+#else
+ if (sock_errno() != WSAENOPROTOOPT) {
+#endif
return sock_errno();
}
} else {
return sock_errno();
}
} else {
@@
-352,7
+360,7
@@
shorten_name_via_proc(const char *name, char short_name[MAX_UN_LEN + 1],
int dirfd;
int len;
int dirfd;
int len;
- if (LINUX) {
+ if (
!
LINUX) {
return ENAMETOOLONG;
}
return ENAMETOOLONG;
}