From 5d992dbef20e633052ff934cc181908c7f8de4f2 Mon Sep 17 00:00:00 2001 From: Colin Clark Date: Tue, 26 Apr 2022 17:14:43 +0100 Subject: [PATCH] Fix #684: incompatible pointer types passing struct sockaddr_un https://github.com/BestImageViewer/geeqie/issues/684 incompatible pointer types passing 'struct sockaddr_un *' to parameter of type 'const struct sockaddr *' --- src/remote.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/remote.c b/src/remote.c index 2f4b88f5..ac1dac9c 100644 --- a/src/remote.c +++ b/src/remote.c @@ -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)); -- 2.20.1