pkgsrc/audio/amp/patches/patch-ad
joerg cfb308702c - add DragonFly support and fix OSS audio for !Linux platforms
- fix 'label at end of compound statement'
2005-11-18 14:52:44 +00:00

45 lines
1.3 KiB
Text

$NetBSD: patch-ad,v 1.4 2005/11/18 14:52:44 joerg Exp $
--- guicontrol.c.orig 1997-08-23 11:30:51.000000000 +0000
+++ guicontrol.c
@@ -312,6 +312,14 @@ void gui_control(void)
if (quit_flag)
{
/* fprintf(stderr, "quit_flag is true\n"); */
+
+ if((flags = fcntl(STDOUT_FILENO, F_GETFL, 0)) < 0)
+ perror("fcntl");
+ flags &= ~O_NONBLOCK;
+
+ if(fcntl(STDOUT_FILENO, F_SETFL, flags) < 0)
+ perror("fcntl");
+
exit(0);
}
while(GUI_FD_TO_PLAY != -1)
@@ -334,7 +342,7 @@ void gui_control(void)
if((flags = fcntl(STDIN_FILENO, F_GETFL, 0)) < 0)
perror("fcntl");
- flags ^= O_NONBLOCK;
+ flags &= ~O_NONBLOCK;
if(fcntl(STDIN_FILENO, F_SETFL, flags) < 0)
perror("fcntl");
@@ -376,6 +384,7 @@ int decodeMPEG_2(int inFilefd)
case GETHDR_SYN: warn("oops, we're out of sync.\n");
break;
default:
+ break;
}
break;
}
@@ -394,7 +403,7 @@ int decodeMPEG_2(int inFilefd)
/* Set stdin to blocking */
if((flags = fcntl(STDIN_FILENO, F_GETFL, 0)) < 0)
perror("fcntl");
- flags ^= O_NONBLOCK;
+ flags &= ~O_NONBLOCK;
if(fcntl(STDIN_FILENO, F_SETFL, flags) < 0)
perror("fcntl");
}