Fix #684: incompatible pointer types passing struct sockaddr_un
[geeqie.git] / src / remote.c
index 2f4b88f..ac1dac9 100644 (file)
@@ -264,7 +264,7 @@ static RemoteConnection *remote_server_open(const gchar *path)
        addr.sun_family = AF_UNIX;
        sun_path_len = MIN(strlen(path) + 1, UNIX_PATH_MAX);
        strncpy(addr.sun_path, path, sun_path_len);
-       if (bind(fd, (struct sockaddr*)&addr, sizeof(addr)) == -1 ||
+       if (bind(fd, (const struct sockaddr*)&addr, sizeof(addr)) == -1 ||
            listen(fd, REMOTE_SERVER_BACKLOG) == -1)
                {
                log_printf("error subscribing to socket: %s\n", strerror(errno));