From: Cyril H. <su...@li...> - 2013-04-23 14:21:23
|
The branch, master, has been updated via 738f74ec1a67ec9522508969a72e3e9f2d19b9f8 (commit) from 3a48c063457d2bc61605fdcfc9f30a228b2b19c0 (commit) - Log ----------------------------------------------------------------- commit 738f74ec1a67ec9522508969a72e3e9f2d19b9f8 Author: Jan Stancek <jst...@re...> Date: Tue Apr 23 10:25:37 2013 +0200 sendmsg02: fix compilation on kernel < 2.6.27 Using SOCK_CLOEXEC and SOCK_NONBLOCK breaks compilation on older distros/kernels. These were originally taken from systemd sources, but as it turns out they are not needed to trigger this issue. I confirmed, that issue can still be reproduced on 3.8 kernel and that testcase can be compiled at least back to RHEL5.3 (2.6.18). Reported-by: DAN LI <li...@cn...> Signed-off-by: Jan Stancek <jst...@re...> Acked-by: Wanlong Gao <gao...@cn...> Acked-by: Cyril Hrubis <ch...@su...> ----------------------------------------------------------------------- Summary of changes: testcases/kernel/syscalls/sendmsg/sendmsg02.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/testcases/kernel/syscalls/sendmsg/sendmsg02.c b/testcases/kernel/syscalls/sendmsg/sendmsg02.c index 8f38f2c..c38d438 100644 --- a/testcases/kernel/syscalls/sendmsg/sendmsg02.c +++ b/testcases/kernel/syscalls/sendmsg/sendmsg02.c @@ -88,7 +88,7 @@ static void client(int id, int pipefd[]) mh.msg_iovlen = 1; do { - fd = socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0); + fd = socket(AF_UNIX, SOCK_DGRAM, 0); write(pipefd[1], &fd, 1); sendmsg(fd, &mh, MSG_NOSIGNAL); close(fd); @@ -109,7 +109,7 @@ static void server(int id, int pipefd[]) snprintf(sa.sun_path, sizeof(sa.sun_path), "socket_test%d", id); do { - fd = socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC|SOCK_NONBLOCK, 0); + fd = socket(AF_UNIX, SOCK_DGRAM, 0); unlink(sa.sun_path); bind(fd, (struct sockaddr *) &sa, sizeof(struct sockaddr_un)); read(pipefd[0], &fd, 1); hooks/post-receive -- ltp |