From e7e6484b113c040967932e6cfbb91a3469efda56 Mon Sep 17 00:00:00 2001 From: Anthony Molinaro Date: Mon, 13 Feb 2017 13:46:42 -0800 Subject: The protocol argument to socketpair was incorrect. For some reason the protocol was being set to PF_UNIX which is incorrect. According to the man pages and other sources (like Stevens Unix Network Programming), the protocol should be '0' which will use the default for the given domain. This appears to actually work under Linux (which appears to allow 0 or 1 as the protocol without error), but fails under Mac OSX (which only allows 0). --- tests/check.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/check.c b/tests/check.c index 25e27b49..2fb51cc6 100644 --- a/tests/check.c +++ b/tests/check.c @@ -13,7 +13,7 @@ gboolean g_io_channel_pair(GIOChannel **ch1, GIOChannel **ch2) { int sock[2]; - if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNIX, sock) < 0) { + if (socketpair(AF_UNIX, SOCK_STREAM, 0, sock) < 0) { perror("socketpair"); return FALSE; } -- cgit v1.2.3