rpms/sblim-cmpi-rpm/EL-6 sblim-cmpi-rpm-page-size.patch, NONE, 1.1 sblim-cmpi-rpm.spec, 1.2, 1.3

Praveen K Paladugu praveenp at fedoraproject.org
Fri Jul 2 16:29:27 UTC 2010


Author: praveenp

Update of /cvs/pkgs/rpms/sblim-cmpi-rpm/EL-6
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv3595

Modified Files:
	sblim-cmpi-rpm.spec 
Added Files:
	sblim-cmpi-rpm-page-size.patch 
Log Message:
Fixing the build failure in ppc64


sblim-cmpi-rpm-page-size.patch:
 cimrpmv4.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- NEW FILE sblim-cmpi-rpm-page-size.patch ---
diff -up ./cimrpmv4.c.old ./cimrpmv4.c
--- ./cimrpmv4.c.old	2010-07-02 10:55:17.150010802 -0500
+++ ./cimrpmv4.c	2010-07-02 10:56:20.830011347 -0500
@@ -85,7 +85,7 @@ void CRPM_TermPkgEnumv4(CRPM_SE* se)
   if (se) {
     eh=se->reserved;
     /* ptr validity check -- see InitPkgEnum */
-    if ((int)eh > PAGE_SIZE && (void*)eh < sbrk(0) && eh->ehMagic==EH_MAGIC) {
+    if ((int)eh > sysconf(_SC_PAGE_SIZE)  && (void*)eh < sbrk(0) && eh->ehMagic==EH_MAGIC) {
       if (eh->ehCmdstr)
 	free(eh->ehCmdstr);
       if (eh->ehListResult)
@@ -142,7 +142,7 @@ static int InitPkgHelper(HCRPM dbptr,CRP
   /* we are checking that pointer is valid by making sure
      it is pointing to memory above the first page and below the
      address space break value */
-  if ((int)eh >= PAGE_SIZE && (void*)eh < sbrk(0) && eh->ehMagic==EH_MAGIC) {
+  if ((int)eh >= sysconf(_SC_PAGE_SIZE)  && (void*)eh < sbrk(0) && eh->ehMagic==EH_MAGIC) {
     /* leftover from previous enumeration */
     CRPM_TermPkgEnumv4(se);
   }


Index: sblim-cmpi-rpm.spec
===================================================================
RCS file: /cvs/pkgs/rpms/sblim-cmpi-rpm/EL-6/sblim-cmpi-rpm.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- sblim-cmpi-rpm.spec	2 Jul 2010 15:22:02 -0000	1.2
+++ sblim-cmpi-rpm.spec	2 Jul 2010 16:29:26 -0000	1.3
@@ -9,6 +9,7 @@ URL:		http://sblim.wiki.sourceforge.net/
 Source0:	http://downloads.sourceforge.net/project/sblim/sblim-cmpi-rpm/%{version}/%{name}-%{version}.tar.bz2
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Patch0:		sblim_cmpi_rpm_ldl_library.patch
+Patch1:		%{name}-page-size.patch
 BuildRequires:	sblim-cmpi-base-devel sblim-cmpi-devel rpm-devel
 Requires:	sblim-cmpi-base
 
@@ -30,6 +31,7 @@ SBLIM rpm provider devel package
 
 # Patch added to fix the missing definitions of dlopen, dlsym, dlerror.
 %patch0
+%patch1 -p1
 
 
 %build
@@ -83,6 +85,10 @@ rm -rf $RPM_BUILD_ROOT
 %postun -p /sbin/ldconfig
 
 %changelog
+* Fri Jul  2 2010 Praveen K Paladugu <praveen_paladugu at dell.com> - 1.0.1-6
+- Fixing the build on ppc64 by replacing PAGE_SIZE with 
+-      sysconf(_SC_PAGE_SIZE) in a new patch
+
 * Fri Jul  2 2010 Praveen K Paladugu <praveen_paladugu at dell.com> - 1.0.1-5
 - Had to bump up the release for proper tagging
 



More information about the scm-commits mailing list