projects
/
tinc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0cd2953
)
fix macos build
author
leptonyu
<i@icymint.me>
Sun, 15 Mar 2020 01:39:42 +0000
(
01:39
+0000)
committer
leptonyu
<i@icymint.me>
Sun, 15 Mar 2020 01:39:42 +0000
(
01:39
+0000)
src/fd_device.c
patch
|
blob
|
history
diff --git
a/src/fd_device.c
b/src/fd_device.c
index
8429556
..
eab9e16
100644
(file)
--- a/
src/fd_device.c
+++ b/
src/fd_device.c
@@
-55,7
+55,11
@@
static int read_fd(int socket) {
logger(DEBUG_ALWAYS, LOG_ERR, "Could not read from unix socket (error %d)!", ret);
return -1;
}
logger(DEBUG_ALWAYS, LOG_ERR, "Could not read from unix socket (error %d)!", ret);
return -1;
}
+#ifdef IP_RECVERR
if(msg.msg_flags & (MSG_CTRUNC | MSG_OOB | MSG_ERRQUEUE)) {
if(msg.msg_flags & (MSG_CTRUNC | MSG_OOB | MSG_ERRQUEUE)) {
+#else
+ if(msg.msg_flags & (MSG_CTRUNC | MSG_OOB)) {
+#endif
logger(DEBUG_ALWAYS, LOG_ERR, "Error while receiving message (flags %d)!", msg.msg_flags);
return -1;
}
logger(DEBUG_ALWAYS, LOG_ERR, "Error while receiving message (flags %d)!", msg.msg_flags);
return -1;
}
@@
-73,7
+77,7
@@
static int read_fd(int socket) {
}
if(cmsgptr->cmsg_len != CMSG_LEN(sizeof(device_fd))) {
logger(DEBUG_ALWAYS, LOG_ERR, "Wrong CMSG data length: %lu, expected %lu!",
}
if(cmsgptr->cmsg_len != CMSG_LEN(sizeof(device_fd))) {
logger(DEBUG_ALWAYS, LOG_ERR, "Wrong CMSG data length: %lu, expected %lu!",
- cmsgptr->cmsg_len, CMSG_LEN(sizeof(device_fd)));
+
(unsigned long)
cmsgptr->cmsg_len, CMSG_LEN(sizeof(device_fd)));
return -1;
}
return -1;
}