Takashi Iwai 8546cf
From 77be4c878c72e411ad22af96b6f81dd45c26450a Mon Sep 17 00:00:00 2001
Takashi Iwai 8546cf
From: Julien BOIBESSOT <julien.boibessot@armadeus.com>
Takashi Iwai 8546cf
Date: Tue, 5 Dec 2017 18:48:14 +0100
Takashi Iwai 8546cf
Subject: [PATCH] tools/usbip: fixes build with musl libc toolchain
Takashi Iwai 8546cf
Mime-version: 1.0
Takashi Iwai 8546cf
Content-type: text/plain; charset=UTF-8
Takashi Iwai 8546cf
Content-transfer-encoding: 8bit
Takashi Iwai 8546cf
Git-commit: 77be4c878c72e411ad22af96b6f81dd45c26450a
Takashi Iwai 8546cf
Patch-mainline: v4.16-rc1
Takashi Iwai 8546cf
References: bsc#1051510
Takashi Iwai 8546cf
Takashi Iwai 8546cf
Indeed musl doesn't define old SIGCLD signal name but only new one SIGCHLD.
Takashi Iwai 8546cf
SIGCHLD is the new POSIX name for that signal so it doesn't change
Takashi Iwai 8546cf
anything on other libcs.
Takashi Iwai 8546cf
Takashi Iwai 8546cf
This fixes this kind of build error:
Takashi Iwai 8546cf
Takashi Iwai 8546cf
Usbipd.c: In function ‘set_signal’:
Takashi Iwai 8546cf
usbipd.c:459:12: error: 'SIGCLD' undeclared (first use in this function)
Takashi Iwai 8546cf
  sigaction(SIGCLD, &act, NULL);
Takashi Iwai 8546cf
            ^~~~~~
Takashi Iwai 8546cf
usbipd.c:459:12: note: each undeclared identifier is reported only once
Takashi Iwai 8546cf
	for each function it appears in
Takashi Iwai 8546cf
Makefile:407: recipe for target 'usbipd.o' failed
Takashi Iwai 8546cf
Make[3]: *** [usbipd.o] Error 1
Takashi Iwai 8546cf
Takashi Iwai 8546cf
Signed-off-by: Julien BOIBESSOT <julien.boibessot@armadeus.com>
Takashi Iwai 8546cf
Acked-by: Shuah Khan <shuahkh@osg.samsung.com>
Takashi Iwai 8546cf
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Takashi Iwai 8546cf
Acked-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai 8546cf
Takashi Iwai 8546cf
---
Takashi Iwai 8546cf
 tools/usb/usbip/src/usbipd.c | 2 +-
Takashi Iwai 8546cf
 1 file changed, 1 insertion(+), 1 deletion(-)
Takashi Iwai 8546cf
Takashi Iwai 8546cf
diff --git a/tools/usb/usbip/src/usbipd.c b/tools/usb/usbip/src/usbipd.c
Takashi Iwai 8546cf
index 009afb4a3aae..c6dad2a13c80 100644
Takashi Iwai 8546cf
--- a/tools/usb/usbip/src/usbipd.c
Takashi Iwai 8546cf
+++ b/tools/usb/usbip/src/usbipd.c
Takashi Iwai 8546cf
@@ -456,7 +456,7 @@ static void set_signal(void)
Takashi Iwai 8546cf
 	sigaction(SIGTERM, &act, NULL);
Takashi Iwai 8546cf
 	sigaction(SIGINT, &act, NULL);
Takashi Iwai 8546cf
 	act.sa_handler = SIG_IGN;
Takashi Iwai 8546cf
-	sigaction(SIGCLD, &act, NULL);
Takashi Iwai 8546cf
+	sigaction(SIGCHLD, &act, NULL);
Takashi Iwai 8546cf
 }
Takashi Iwai 8546cf
 
Takashi Iwai 8546cf
 static const char *pid_file;
Takashi Iwai 8546cf
-- 
Takashi Iwai 8546cf
2.18.0
Takashi Iwai 8546cf