]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - mdmon.c
Add casts for the addr arg of connect and bind
[thirdparty/mdadm.git] / mdmon.c
diff --git a/mdmon.c b/mdmon.c
index ee12b7c788ac0fc969499204343db8f39b124843..e4b73d96b96c6482df7915daeb03b67b580f93fd 100644 (file)
--- a/mdmon.c
+++ b/mdmon.c
@@ -235,7 +235,7 @@ static int make_control_sock(char *devname)
        addr.sun_family = PF_LOCAL;
        strcpy(addr.sun_path, path);
        umask(077); /* ensure no world write access */
-       if (bind(sfd, &addr, sizeof(addr)) < 0) {
+       if (bind(sfd, (struct sockaddr*)&addr, sizeof(addr)) < 0) {
                close(sfd);
                return -1;
        }