Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP5:Update
mdadm.5365
0153-Add-casts-for-the-addr-arg-of-connect-and-...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0153-Add-casts-for-the-addr-arg-of-connect-and-bind.patch of Package mdadm.5365
From 50d72ed4298618c679efd43647dd055527e59b10 Mon Sep 17 00:00:00 2001 From: Khem Raj <raj.khem@gmail.com> Date: Wed, 13 Jan 2016 22:32:39 -0800 Subject: [PATCH 213/359] Add casts for the addr arg of connect and bind References: bsc#1081910 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> Signed-off-by: Coly Li <colyli@suse.de> --- mdmon.c | 2 +- msg.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mdmon.c b/mdmon.c index ee12b7c..e4b73d9 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; } diff --git a/msg.c b/msg.c index 754630b..45cd450 100644 --- a/msg.c +++ b/msg.c @@ -170,7 +170,7 @@ int connect_monitor(char *devname) addr.sun_family = PF_LOCAL; strcpy(addr.sun_path, path); - if (connect(sfd, &addr, sizeof(addr)) < 0) { + if (connect(sfd, (struct sockaddr*)&addr, sizeof(addr)) < 0) { close(sfd); return -1; } -- 2.16.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor