diff options
author | Pierre Ossman <ossman@cendio.se> | 2006-01-05 18:27:09 +0000 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2006-01-05 18:27:09 +0000 |
commit | 3a3b4aff37397b786782d5a7e1f106b83d272abd (patch) | |
tree | 15e1490ebee57e1d6242c30e3f75cf969fc26d96 /polyp/socket-util.c | |
parent | dbad54a20bf323d35176b1faba4fdd4b425f9ad9 (diff) |
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
Diffstat (limited to 'polyp/socket-util.c')
-rw-r--r-- | polyp/socket-util.c | 6 |
1 files changed, 3 insertions, 3 deletions
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; |