chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9facc64
)
socket-util: Run the fallback when the kernel complains about the null buffer (#3541)
author
Kai Ruhnau
<Kai.Ruhnau@live.com>
Wed, 15 Jun 2016 10:33:24 +0000
(12:33 +0200)
committer
Sven Eden
<yamakuzure@gmx.net>
Fri, 16 Jun 2017 08:13:01 +0000
(10:13 +0200)
Calling recv with a NULL buffer returns EFAULT instead of EOPNOTSUPP on
older kernels (3.14).
Fixes #3407
Signed-off-by: Kai Ruhnau <kai.ruhnau@target-sg.com>
src/basic/socket-util.c
patch
|
blob
|
history
diff --git
a/src/basic/socket-util.c
b/src/basic/socket-util.c
index 86d6e3f6e1a609b020c51eded17bc7adbf766717..f47a8f04e0399c16233ebad5b9b8481681363e9c 100644
(file)
--- a/
src/basic/socket-util.c
+++ b/
src/basic/socket-util.c
@@
-991,7
+991,7
@@
ssize_t next_datagram_size_fd(int fd) {
l = recv(fd, NULL, 0, MSG_PEEK|MSG_TRUNC);
if (l < 0) {
- if (errno == EOPNOTSUPP)
+ if (errno == EOPNOTSUPP
|| errno == EFAULT
)
goto fallback;
return -errno;