libao/libao-ocloexec.patch

45 lines
1017 B
Diff

--- src/audio_out.c.orig
+++ src/audio_out.c
@@ -1344,7 +1344,7 @@ ao_device *ao_open_file (int driver_id,
if (!overwrite) {
/* Test for file existence */
- file = fopen(filename, "r");
+ file = fopen(filename, "re");
if (file != NULL) {
fclose(file);
errno = AO_EFILEEXISTS;
@@ -1353,7 +1353,7 @@ ao_device *ao_open_file (int driver_id,
}
- file = fopen(filename, "w");
+ file = fopen(filename, "we");
}
--- src/config.c.orig
+++ src/config.c
@@ -57,7 +57,7 @@ static int ao_read_config_file(ao_config
char line[LINE_LEN];
int end;
- if ( !(fp = fopen(config_file, "r")) )
+ if ( !(fp = fopen(config_file, "re")) )
return 0; /* Can't open file */
while (fgets(line, LINE_LEN, fp)) {
--- configure.ac.orig
+++ configure.ac
@@ -30,7 +30,9 @@ dnl Check for programs
dnl ====================================
cflags_save="$CFLAGS"
-AC_PROG_CC
+AC_PROG_CC_STDC
+AC_USE_SYSTEM_EXTENSIONS
+AC_SYS_LARGEFILE
AC_LIBTOOL_WIN32_DLL
AC_LIBTOOL_DLOPEN
AM_PROG_LIBTOOL