summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6605ff1)
raw | patch | inline | side by side (parent: 6605ff1)
author | Florian Forster <octo@crystal.wlan.home.verplant.org> | |
Tue, 30 Dec 2008 15:46:38 +0000 (16:46 +0100) | ||
committer | Florian Forster <octo@crystal.wlan.home.verplant.org> | |
Tue, 30 Dec 2008 15:46:38 +0000 (16:46 +0100) |
Under Mac OS X (10.4, possibly others), PF_UNIX is defined as PF_LOCAL, which
in turn is defined as AF_LOCAL. AF_LOCAL, however, is only defined if
POSIX_C_SOURCE is not.
in turn is defined as AF_LOCAL. AF_LOCAL, however, is only defined if
POSIX_C_SOURCE is not.
src/libcollectdclient/client.c | patch | blob | history |
index 96b828ea0ceb6e082f30c90319c1b193a21eaba0..b2f2daff93798318196dbf9bf32a9710dcdee37d 100644 (file)
@@ -363,7 +363,9 @@ static int lcc_open_unixsocket (lcc_connection_t *c, const char *path) /* {{{ */
assert (c->fh == NULL);
assert (path != NULL);
- fd = socket (PF_UNIX, SOCK_STREAM, /* protocol = */ 0);
+ /* Don't use PF_UNIX here, because it's broken on Mac OS X (10.4, possibly
+ * others). */
+ fd = socket (AF_UNIX, SOCK_STREAM, /* protocol = */ 0);
if (fd < 0)
{
lcc_set_errno (c, errno);