aboutsummaryrefslogtreecommitdiffstats
path: root/src/satd.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@member.fsf.org>2015-12-29 16:10:07 +0100
committerMattias Andrée <maandree@member.fsf.org>2015-12-29 16:10:07 +0100
commit97721b5a152e8173ef4bab17f10e3ec22cc82c1f (patch)
treeb8b737b88f4bceb0e34e22a7fbbcd6eebe75a8a9 /src/satd.c
parentfix warnings (diff)
downloadsat-97721b5a152e8173ef4bab17f10e3ec22cc82c1f.tar.gz
sat-97721b5a152e8173ef4bab17f10e3ec22cc82c1f.tar.bz2
sat-97721b5a152e8173ef4bab17f10e3ec22cc82c1f.tar.xz
m
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to 'src/satd.c')
-rw-r--r--src/satd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/satd.c b/src/satd.c
index 0a5fb3b..5530b6b 100644
--- a/src/satd.c
+++ b/src/satd.c
@@ -56,6 +56,7 @@ static int
create_socket(struct sockaddr_un *address)
{
int fd = -1, bound = 0;
+ const void *_cvoid;
const char *dir;
int saved_errno;
@@ -87,7 +88,7 @@ create_socket(struct sockaddr_un *address)
does_not_exist:
t ((fd = socket(PF_UNIX, SOCK_STREAM, 0)) == -1);
t (fchmod(fd, S_IRWXU) == -1);
- t (bind(fd, (struct sockaddr *)address, (socklen_t)sizeof(*address)) == -1);
+ t (bind(fd, (const struct sockaddr *)(_cvoid = address), (socklen_t)sizeof(*address)) == -1);
/* EADDRINUSE just means that the file already exists, not that it is actually used. */
bound = 1;