Accepting request 93380 from home:elvigia:branches:multimedia:libs

- use O_CLOEXEC in library code.

OBS-URL: https://build.opensuse.org/request/show/93380
OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/libsndfile?expand=0&rev=33
This commit is contained in:
Ismail Dönmez 2011-11-24 07:26:14 +00:00 committed by Git OBS Bridge
parent a02cedace6
commit 23a79cd888
3 changed files with 42 additions and 1 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Nov 24 01:54:21 UTC 2011 - crrodriguez@opensuse.org
- use O_CLOEXEC in library code.
-------------------------------------------------------------------
Tue Nov 22 19:04:31 UTC 2011 - coolo@suse.com

View File

@ -45,6 +45,7 @@ Source2: baselibs.conf
Patch0: libsndfile-example-fix.diff
# PATCH-MISSING-TAG -- See http://en.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch1: libsndfile-paf-zero-division-fix.diff
Patch2: sndfile-ocloexec.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
@ -85,10 +86,11 @@ libsndfile library.
%setup -q
%patch0
%patch1 -p1
%patch2
%build
%define warn_flags -W -Wall -Wstrict-prototypes -Wpointer-arith -Wno-unused-parameter
# autoreconf --force --install
autoreconf --force --install
CFLAGS="%{optflags} %{warn_flags}"
export CFLAGS
%configure --disable-silent-rules \

34
sndfile-ocloexec.patch Normal file
View File

@ -0,0 +1,34 @@
--- configure.ac.orig
+++ configure.ac
@@ -23,7 +23,9 @@ AC_SUBST(ACLOCAL_AMFLAGS, "-I M4")
AC_LANG([C])
-AC_PROG_CC
+AC_PROG_CC_STDC
+AC_USE_SYSTEM_EXTENSIONS
+AC_SYS_LARGEFILE
AM_PROG_CC_C_O
AC_PROG_CXX
AC_PROG_SED
--- src/file_io.c.orig
+++ src/file_io.c
@@ -564,6 +564,9 @@ psf_open_fd (PSF_FILE * pfile)
return - SFE_BAD_OPEN_MODE ;
break ;
} ;
+#ifdef O_CLOEXEC
+ oflag |= O_CLOEXEC;
+#endif
if (mode == 0)
fd = open (pfile->path.c, oflag) ;
--- Makefile.am.orig
+++ Makefile.am
@@ -1,5 +1,6 @@
## Process this file with automake to produce Makefile.in
+ACLOCAL_AMFLAGS = -I M4
DISTCHECK_CONFIGURE_FLAGS = --enable-gcc-werror
if BUILD_OCTAVE_MOD