From: Samuel Thibault Date: Fri, 26 Jun 2020 20:44:30 +0000 (+0200) Subject: tst-cancel4-common.c: fix calling socketpair X-Git-Tag: upstream/2.34~1761 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b9ca3f3efb4659cadf4b0b81308ce9d45de61e0b;p=platform%2Fupstream%2Fglibc.git tst-cancel4-common.c: fix calling socketpair PF_UNIX was actually never intended to be passed as protocol parameter to socket() calls: it is a protocol family, not a protocol. It happens that Linux introduced accepting it during its 2.0 development, but it shouldn't. OpenBSD kernels accept it as well, but FreeBSD and NetBSD rightfully do not. GNU/Hurd does not either. * nptl/tst-cancel4-common.c (do_test): Pass 0 instead of PF_UNIX as protocol. --- diff --git a/nptl/tst-cancel4-common.c b/nptl/tst-cancel4-common.c index f2026b8..9a6924c 100644 --- a/nptl/tst-cancel4-common.c +++ b/nptl/tst-cancel4-common.c @@ -20,7 +20,7 @@ static int do_test (void) { - if (socketpair (AF_UNIX, SOCK_STREAM, PF_UNIX, fds) != 0) + if (socketpair (AF_UNIX, SOCK_STREAM, 0, fds) != 0) { perror ("socketpair"); exit (1);