summaryrefslogtreecommitdiffstats
path: root/mdmon.c
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2016-01-14 07:32:39 +0100
committerNeilBrown <neilb@suse.com>2016-01-14 22:36:45 +0100
commit50d72ed4298618c679efd43647dd055527e59b10 (patch)
treed170be9783e4722123bcfe63560c4b09167ece22 /mdmon.c
parentDefine _POSIX_C_SOURCE if undefined (diff)
downloadmdadm-50d72ed4298618c679efd43647dd055527e59b10.tar.xz
mdadm-50d72ed4298618c679efd43647dd055527e59b10.zip
Add casts for the addr arg of connect and bind
glibc allows the addr arg to connect and socket to be any of a number of 'sockaddr_*' types, but musl requires 'const struct sockaddr *' which is in line with open group specs. So add casts to allow compilation with musl. Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: NeilBrown <neilb@suse.com>
Diffstat (limited to 'mdmon.c')
-rw-r--r--mdmon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mdmon.c b/mdmon.c
index ee12b7c7..e4b73d96 100644
--- 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;
}