From 3a3b4aff37397b786782d5a7e1f106b83d272abd Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Thu, 5 Jan 2006 18:27:09 +0000 Subject: AF_UNIX and PF_UNIX is more portable than the _LOCAL equivalent. git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/ossman@376 fefdeb5f-60dc-0310-8127-8f9354f1896f --- polyp/socket-util.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'polyp/socket-util.c') diff --git a/polyp/socket-util.c b/polyp/socket-util.c index 7b32f4ee..cd132d7d 100644 --- a/polyp/socket-util.c +++ b/polyp/socket-util.c @@ -77,7 +77,7 @@ void pa_socket_peer_to_string(int fd, char *c, size_t l) { ip & 0xFF, ntohs(sa.in.sin_port)); return; - } else if (sa.sa.sa_family == AF_LOCAL) { + } else if (sa.sa.sa_family == AF_UNIX) { snprintf(c, l, "UNIX socket client"); return; } @@ -165,12 +165,12 @@ int pa_unix_socket_is_stale(const char *fn) { struct sockaddr_un sa; int fd = -1, ret = -1; - if ((fd = socket(PF_LOCAL, SOCK_STREAM, 0)) < 0) { + if ((fd = socket(PF_UNIX, SOCK_STREAM, 0)) < 0) { pa_log(__FILE__": socket(): %s\n", strerror(errno)); goto finish; } - sa.sun_family = AF_LOCAL; + sa.sun_family = AF_UNIX; strncpy(sa.sun_path, fn, sizeof(sa.sun_path)-1); sa.sun_path[sizeof(sa.sun_path) - 1] = 0; -- cgit