summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libao2/ao_oss.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libao2/ao_oss.c b/libao2/ao_oss.c
index 28211df0de..4cd98d9d5e 100644
--- a/libao2/ao_oss.c
+++ b/libao2/ao_oss.c
@@ -248,6 +248,10 @@ static void reset(){
return;
}
+#if defined(FD_CLOEXEC) && defined(F_SETFD)
+ fcntl(audio_fd, F_SETFD, FD_CLOEXEC);
+#endif
+
ioctl (audio_fd, SNDCTL_DSP_SETFMT, &ao_data.format);
if(ao_data.format != AFMT_AC3) {
if (ao_data.channels > 2)