add packaging
[platform/upstream/libsndfile.git] / packaging / sndfile-ocloexec.patch
1 --- configure.ac.orig
2 +++ configure.ac
3 @@ -23,7 +23,9 @@ AC_SUBST(ACLOCAL_AMFLAGS, "-I M4")
4  
5  AC_LANG([C])
6  
7 -AC_PROG_CC
8 +AC_PROG_CC_STDC
9 +AC_USE_SYSTEM_EXTENSIONS
10 +AC_SYS_LARGEFILE
11  AM_PROG_CC_C_O
12  AC_PROG_CXX
13  AC_PROG_SED
14 --- src/file_io.c.orig
15 +++ src/file_io.c
16 @@ -564,6 +564,9 @@ psf_open_fd (PSF_FILE * pfile)
17                                 return - SFE_BAD_OPEN_MODE ;
18                                 break ;
19                 } ;
20 +#ifdef O_CLOEXEC
21 +        oflag |= O_CLOEXEC;
22 +#endif
23  
24         if (mode == 0)
25                 fd = open (pfile->path.c, oflag) ;
26 --- Makefile.am.orig
27 +++ Makefile.am
28 @@ -1,5 +1,6 @@
29  ## Process this file with automake to produce Makefile.in
30  
31 +ACLOCAL_AMFLAGS = -I M4
32  DISTCHECK_CONFIGURE_FLAGS = --enable-gcc-werror
33  
34  if BUILD_OCTAVE_MOD