summaryrefslogtreecommitdiff
path: root/package/alsa-lib/patches/patch-src_pcm_pcm_direct_c
blob: 0ca0e211f4670c4b3b5aeb83a0d2c47dd1ef8227 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--- alsa-lib-1.0.29.orig/src/pcm/pcm_direct.c	2015-02-26 13:34:52.000000000 +0100
+++ alsa-lib-1.0.29/src/pcm/pcm_direct.c	2016-11-20 18:20:58.456540169 +0100
@@ -424,13 +424,21 @@ int snd_pcm_direct_server_create(snd_pcm
 		close(dmix->server_fd);
 		return ret;
 	}
-	
+
+#ifdef HAVE_FORK
 	ret = fork();
+#else
+	ret = vfork();
+#endif
 	if (ret < 0) {
 		close(dmix->server_fd);
 		return ret;
 	} else if (ret == 0) {
+#ifdef HAVE_FORK
 		ret = fork();
+#else
+		ret = vfork();
+#endif
 		if (ret == 0)
 			server_job(dmix);
 		_exit(EXIT_SUCCESS);