public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] tst-cancel4-common.c: fix calling socketpair
@ 2020-06-26 21:52 Samuel Thibault
0 siblings, 0 replies; only message in thread
From: Samuel Thibault @ 2020-06-26 21:52 UTC (permalink / raw)
To: glibc-cvs
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=b9ca3f3efb4659cadf4b0b81308ce9d45de61e0b
commit b9ca3f3efb4659cadf4b0b81308ce9d45de61e0b
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date: Fri Jun 26 22:44:30 2020 +0200
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:
---
nptl/tst-cancel4-common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/nptl/tst-cancel4-common.c b/nptl/tst-cancel4-common.c
index f2026b81f4..9a6924c1c6 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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-06-26 21:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-26 21:52 [glibc] tst-cancel4-common.c: fix calling socketpair Samuel Thibault
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).