diff options
Diffstat (limited to 'stream/ai_oss.c')
-rw-r--r-- | stream/ai_oss.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/stream/ai_oss.c b/stream/ai_oss.c index 46e232b264..d222490430 100644 --- a/stream/ai_oss.c +++ b/stream/ai_oss.c @@ -36,6 +36,8 @@ #endif #endif +#include "osdep/io.h" + #include "audio_in.h" #include "mpvcore/mp_msg.h" @@ -85,7 +87,7 @@ int ai_oss_init(audio_in_t *ai) int err; int ioctl_param; - ai->oss.audio_fd = open(ai->oss.device, O_RDONLY); + ai->oss.audio_fd = open(ai->oss.device, O_RDONLY | O_CLOEXEC); if (ai->oss.audio_fd < 0) { mp_tmsg(MSGT_TV, MSGL_ERR, "Unable to open '%s': %s\n", |