aboutsummaryrefslogtreecommitdiffstats
path: root/tests/check.c
diff options
context:
space:
mode:
authorAnthony Molinaro <anthonym@alumni.caltech.edu>2017-02-13 13:46:42 -0800
committerdx <dx@dxzone.com.ar>2017-03-12 01:27:59 -0300
commite7e6484b113c040967932e6cfbb91a3469efda56 (patch)
tree19a654fe425bafd0909eda407f3c28b00bd7f7ce /tests/check.c
parent16e4a9fdb996b2f64a61de634458fe4a9111d303 (diff)
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).
Diffstat (limited to 'tests/check.c')
-rw-r--r--tests/check.c2
1 files changed, 1 insertions, 1 deletions
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;
}