summaryrefslogtreecommitdiff
path: root/audio/jack/patches/patch-ab
blob: e307bae44b32581754c2ad4b4355190625b488fa (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
$NetBSD: patch-ab,v 1.4 2008/11/16 11:22:55 bjs Exp $

BSD poll returns POLLIN, not POLLHUP, when the socket is closed,
as does Darwin.

--- jackd/engine.c.orig	2008-11-11 17:36:40.000000000 -0500
+++ jackd/engine.c
@@ -1385,7 +1385,7 @@ handle_external_client_request (jack_eng
 	if ((r = read (client->request_fd, &req, sizeof (req)))
 	    < (ssize_t) sizeof (req)) {
 		if (r == 0) {
-#ifdef JACK_USE_MACH_THREADS
+#if defined(JACK_HOST_HAS_BSD_POLL) || defined(JACK_USE_MACH_THREADS)
 			/* poll is implemented using
 			   select (see the macosx/fakepoll
 			   code). When the socket is closed
@@ -1398,7 +1398,7 @@ handle_external_client_request (jack_eng
 			   and remove the client.
 			*/
 			jack_mark_client_socket_error (engine, fd);
-#endif /* JACK_USE_MACH_THREADS */
+#endif /* JACK_HOST_HAS_BSD_POLL | JACK_USE_MACH_THREADS */
 			return 1;
 		} else {
 			jack_error ("cannot read request from client (%d/%d/%s)",