From 36242db022eeb56ff597e3e3b4c42ce7aacf2f25 Mon Sep 17 00:00:00 2001
From: Stan Seibert <volsung@xiph.org>
Date: Tue, 23 Sep 2003 14:22:55 +0000
Subject: [PATCH] Some daemons close stdin, so the next file descriptor they
 get is 0.  Allow 0 to be used for playback.  Closes bug 455.

git-svn-id: http://svn.xiph.org/trunk/ao@5365 0101bb08-14d6-0310-b084-bc0e0c8e3800
---
 src/plugins/oss/ao_oss.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/plugins/oss/ao_oss.c b/src/plugins/oss/ao_oss.c
index df79311..1647369 100644
--- a/src/plugins/oss/ao_oss.c
+++ b/src/plugins/oss/ao_oss.c
@@ -105,7 +105,7 @@ int _open_default_oss_device (char **dev_path, int blocking)
 
 #ifdef BROKEN_OSS
 	/* Now have to remove the O_NONBLOCK flag if so instructed. */
-	if (fd > 0 && blocking) {
+	if (fd >= 0 && blocking) {
 		if (fcntl(fd, F_SETFL, 0) < 0) { /* Remove O_NONBLOCK */
 			/* If we can't go to blocking mode, we can't use
 			   this device */
-- 
GitLab