[xmlsec] link error building xmlsec 1.0.2

Matthias Jung matthias.jung at xtradyne.com
Thu Jun 5 03:35:28 PDT 2003


Thanks for the patch.
Building xmlsec on Solaris works fine now.

Matthias


Aleksey Sanin wrote:

> Ops.. Sorry, did not tested this code on Solaris. Please apply the 
> attached
> patch to 1.0.2 sources (or get them from CVS in about an hour).
>
> Thanks for the bug report!
> Aleksey
>
>>
>> Does anybody else using Solaris have this problem?
>> Do you have a clue of how to solve this problem?
>>
>------------------------------------------------------------------------
>
>Index: src/openssl/x509.c
>===================================================================
>RCS file: /cvs/gnome/xmlsec/src/openssl/x509.c,v
>retrieving revision 1.34
>retrieving revision 1.35
>diff -u -r1.34 -r1.35
>--- src/openssl/x509.c	30 Apr 2003 20:47:24 -0000	1.34
>+++ src/openssl/x509.c	4 Jun 2003 15:26:39 -0000	1.35
>@@ -1415,22 +1415,33 @@
>  * (like timegm) use it instead.
>  */
> static time_t 
>-my_timegm (struct tm *tm) { 
>-    time_t ret;
>-    char *tz;                   
>-    
>-    tz = getenv("TZ");
>-    setenv("TZ", "", 1);
>-    tzset();
>-    ret = mktime(tm);
>-    if (tz) {
>-	setenv("TZ", tz, 1); 
>-    } else {
>-	unsetenv("TZ");
>-	tzset(); 
>-	return ret;
>-    }
>+my_timegm(struct tm *t) {  
>+    time_t tl, tb;  
>+    struct tm *tg;  
>+
>+    tl = mktime (t);  
>+    if(tl == -1) {
>+	t->tm_hour--;
>+	tl = mktime (t);
>+	if (tl == -1) {
>+	    return -1;
>+	}
>+	tl += 3600;    
>+    }  
>+    tg = gmtime (&tl);  
>+    tg->tm_isdst = 0;  
>+    tb = mktime (tg);  
>+    if (tb == -1) {
>+	tg->tm_hour--;
>+	tb = mktime (tg);
>+	if (tb == -1) {
>+	    return -1;
>+	}
>+	tb += 3600;    
>+    }  
>+    return (tl - (tb - tl)); 
> }
>+
> #define timegm(tm) my_timegm(tm)
> #endif /* WIN32 */
> #endif /* HAVE_TIMEGM */
>  
>




More information about the xmlsec mailing list