aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2023-07-24 08:32:54 +0200
committerPřemysl Eric Janouch <p@janouch.name>2023-07-24 08:33:45 +0200
commit7a0cb13a1a653f61b0e715f79156046898d0dd1b (patch)
tree7e7922a3bdfe8b14050ba4dd9278ca568548b379
parentb6c54073cdeb25e8f505477d838d6894b062322c (diff)
downloadliberty-7a0cb13a1a653f61b0e715f79156046898d0dd1b.tar.gz
liberty-7a0cb13a1a653f61b0e715f79156046898d0dd1b.tar.xz
liberty-7a0cb13a1a653f61b0e715f79156046898d0dd1b.zip
MPD client: fix build on OpenIndiana
-rw-r--r--liberty-proto.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/liberty-proto.c b/liberty-proto.c
index 63ce214..7c884e9 100644
--- a/liberty-proto.c
+++ b/liberty-proto.c
@@ -1911,14 +1911,14 @@ mpd_client_connect_unix (struct mpd_client *self, const char *address,
// Expand tilde if needed
char *expanded = resolve_filename (address, xstrdup);
- struct sockaddr_un sun;
- sun.sun_family = AF_UNIX;
- strncpy (sun.sun_path, expanded, sizeof sun.sun_path);
- sun.sun_path[sizeof sun.sun_path - 1] = 0;
+ struct sockaddr_un sau;
+ sau.sun_family = AF_UNIX;
+ strncpy (sau.sun_path, expanded, sizeof sau.sun_path);
+ sau.sun_path[sizeof sau.sun_path - 1] = 0;
free (expanded);
- if (connect (fd, (struct sockaddr *) &sun, sizeof sun))
+ if (connect (fd, (struct sockaddr *) &sau, sizeof sau))
{
error_set (e, "%s: %s", "connect", strerror (errno));
xclose (fd);