rpms/openoffice.org/devel openoffice.org-2.3.0.glibcXXXXX.sal.gettimeofday.patch, NONE, 1.1 openoffice.org.spec, 1.1247, 1.1248

Caolan McNamara (caolanm) fedora-extras-commits at redhat.com
Thu Aug 16 12:04:15 UTC 2007


Author: caolanm

Update of /cvs/pkgs/rpms/openoffice.org/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv24510

Modified Files:
	openoffice.org.spec 
Added Files:
	openoffice.org-2.3.0.glibcXXXXX.sal.gettimeofday.patch 
Log Message:
damn your black heart glibc

openoffice.org-2.3.0.glibcXXXXX.sal.gettimeofday.patch:

--- NEW FILE openoffice.org-2.3.0.glibcXXXXX.sal.gettimeofday.patch ---
Index: osl/unx/time.c
===================================================================
RCS file: /cvs/porting/sal/osl/unx/time.c,v
retrieving revision 1.11
diff -u -r1.11 time.c
--- openoffice.org.orig/sal/osl/unx/time.c	8 Sep 2005 15:02:55 -0000	1.11
+++ openoffice.org/sal/osl/unx/time.c	16 Aug 2007 11:59:47 -0000
@@ -252,23 +252,29 @@
 	return sal_False; 
 }
 
-
-
-static struct timeval startTime;
-static sal_Bool bGlobalTimer = sal_False;
+static struct timeval startTime;
+static sal_Bool bGlobalTimerA = sal_False;
+static sal_Bool bGlobalTimerB = sal_False;
 
 sal_uInt32 SAL_CALL osl_getGlobalTimer()
 {
+  if ( bGlobalTimerA == sal_False )
+  {
+     bGlobalTimerA = sal_True;
+     fprintf(stderr, "skipping using gettimeofday the first time called in an horrific kludge to avoid glibc breakage in .so _init\n");
+     return 0;
+  }
+
   struct timeval currentTime;
   sal_uInt32 nSeconds;
 
   // FIXME: not thread safe !!
-  if ( bGlobalTimer == sal_False )
+  if ( bGlobalTimerB == sal_False )
   {
       gettimeofday( &startTime, NULL );
-      bGlobalTimer=sal_True;
+      bGlobalTimerB=sal_True;
   }
-  
+ 
   gettimeofday( &currentTime, NULL );
   
   nSeconds = (sal_uInt32)( currentTime.tv_sec - startTime.tv_sec );


Index: openoffice.org.spec
===================================================================
RCS file: /cvs/pkgs/rpms/openoffice.org/devel/openoffice.org.spec,v
retrieving revision 1.1247
retrieving revision 1.1248
diff -u -r1.1247 -r1.1248
--- openoffice.org.spec	16 Aug 2007 08:25:05 -0000	1.1247
+++ openoffice.org.spec	16 Aug 2007 12:03:42 -0000	1.1248
@@ -128,6 +128,7 @@
 Patch63: workspace.npower7.patch
 Patch64: openoffice.org-2.3.0.ooo80722.sw.stlportism.patch
 Patch65: openoffice.org-2.3.0.ooo80721.reportdesign.stlportism.patch
+Patch66: openoffice.org-2.3.0.glibcXXXXX.sal.gettimeofday.patch
 
 %define instdir %{_libdir}/openoffice.org
 
@@ -1049,6 +1050,7 @@
 %patch63 -p1 -b .workspace.npower7.patch
 %patch64 -p1 -b .ooo80722.sw.stlportism.patch
 %patch65 -p1 -b .ooo80721.reportdesign.stlportism.patch
+%patch66 -p1 -b .glibcXXXXX.sal.gettimeofday.patch
 
 %if %{linkopt}
 chmod a+x solenv/bin/mklinkscript.pl
@@ -2658,6 +2660,8 @@
 
 %changelog
 * Tue Aug 18 2007 Caolan McNamara <caolanm at redhat.com> - 1:2.3.0-1.1
+- add openoffice.org-2.3.0.glibcXXXXX.sal.gettimeofday.patch to kludge
+  around glibc gettimeofday bustage
 - Resolves: rhbz#251896 count from start of ctl sequence, not start of
   string when doing range test
 - first 2.3.0 prerelease candidate




More information about the fedora-extras-commits mailing list