[voms/el5] Fix compilation problems when strndup is already defined

Mattias Ellert ellert at fedoraproject.org
Thu Jun 26 12:10:36 UTC 2014


commit 06eadf5a49826ed6eedd70776af8e59377deb2bc
Author: Mattias Ellert <mattias.ellert at fysast.uu.se>
Date:   Thu Jun 26 14:10:08 2014 +0200

    Fix compilation problems when strndup is already defined

 voms-strndup.patch |   52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 voms.spec          |    8 +++++++-
 2 files changed, 59 insertions(+), 1 deletions(-)
---
diff --git a/voms-strndup.patch b/voms-strndup.patch
new file mode 100644
index 0000000..40cdd6f
--- /dev/null
+++ b/voms-strndup.patch
@@ -0,0 +1,52 @@
+diff -ur voms-2_0_11.orig/src/sslutils/lex.namespaces.c voms-2_0_11/src/sslutils/lex.namespaces.c
+--- voms-2_0_11.orig/src/sslutils/lex.namespaces.c	2013-08-21 14:02:50.000000000 +0200
++++ voms-2_0_11/src/sslutils/lex.namespaces.c	2014-06-26 13:48:02.731414401 +0200
+@@ -1411,7 +1411,9 @@
+ 
+ #include "parsertypes.h"
+ #include "namespaces.h"
++#ifndef strndup
+ extern char *strndup(const char*, size_t);
++#endif
+ 
+ 
+ #line 1418 "lex.namespaces.c"
+diff -ur voms-2_0_11.orig/src/sslutils/lex.signing.c voms-2_0_11/src/sslutils/lex.signing.c
+--- voms-2_0_11.orig/src/sslutils/lex.signing.c	2013-08-21 14:02:50.000000000 +0200
++++ voms-2_0_11/src/sslutils/lex.signing.c	2014-06-26 13:48:56.779773730 +0200
+@@ -2356,7 +2356,9 @@
+ 
+ #include "parsertypes.h"
+ #include "signing_policy.h"
++#ifndef strndup
+ extern char *strndup(const char*, size_t);
++#endif
+ 
+ 
+ #line 2363 "lex.signing.c"
+diff -ur voms-2_0_11.orig/src/sslutils/namespaces.l voms-2_0_11/src/sslutils/namespaces.l
+--- voms-2_0_11.orig/src/sslutils/namespaces.l	2013-08-21 14:02:50.000000000 +0200
++++ voms-2_0_11/src/sslutils/namespaces.l	2014-06-26 13:48:03.050410620 +0200
+@@ -31,7 +31,9 @@
+ 
+ #include "parsertypes.h"
+ #include "namespaces.h"
++#ifndef strndup
+ extern char *strndup(const char*, size_t);
++#endif
+ %}
+ 
+ %x SINGLE_QUOTED
+diff -ur voms-2_0_11.orig/src/sslutils/signing_policy.l voms-2_0_11/src/sslutils/signing_policy.l
+--- voms-2_0_11.orig/src/sslutils/signing_policy.l	2013-08-21 14:02:50.000000000 +0200
++++ voms-2_0_11/src/sslutils/signing_policy.l	2014-06-26 13:48:56.980771347 +0200
+@@ -31,7 +31,9 @@
+ 
+ #include "parsertypes.h"
+ #include "signing_policy.h"
++#ifndef strndup
+ extern char *strndup(const char*, size_t);
++#endif
+ %}
+ 
+ %x SINGLE_QUOTED
diff --git a/voms.spec b/voms.spec
index eea9554..588dce8 100644
--- a/voms.spec
+++ b/voms.spec
@@ -5,7 +5,7 @@
 Name:		voms
 Version:	2.0.11
 %global tagver %(tr . _ <<< %{version})
-Release:	4%{?dist}
+Release:	5%{?dist}
 Summary:	Virtual Organization Membership Service
 
 Group:		System Environment/Libraries
@@ -18,6 +18,8 @@ Source1:	%{name}.INSTALL
 Patch0:		%{name}-gsoap.patch
 #		From https://jira.opensciencegrid.org/browse/SOFTWARE-1333
 Patch1:		%{name}-sha2-proxy.patch
+#		Fix compilation problems when strndup is already defined
+Patch2:		%{name}-strndup.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:	globus-gssapi-gsi-devel
@@ -122,6 +124,7 @@ administrate it remotely using command line tools or a web interface.
 %setup -q -n %{name}-%{tagver}
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 # Remove embedded gsoap sources
 rm src/server/stdsoap2.c src/server/stdsoap2.h src/server/soap*
@@ -267,6 +270,9 @@ fi
 %doc README.Fedora
 
 %changelog
+* Thu Jun 26 2014 Mattias Ellert <mattias.ellert at fysast.uu.se> - 2.0.11-5
+- Fix compilation problems when strndup is already defined
+
 * Thu Jun 26 2014 Mattias Ellert <mattias.ellert at fysast.uu.se> - 2.0.11-4
 - Patch that fixes a stack smash when SHA2 certificates are used
 


More information about the scm-commits mailing list