Sorry if I'm being really silly here but... can't you just write your own ftime function and add it to speed.c? (the sad thing is speed isn't a vital part of the package anyway - have you tried commenting it out of the makefile and just not bothering with it?)
To be honest you could most likely get away with just commenting out the lines that call ftime those lines as well, or defining ftime to be int ftime(struct timeb *tp) { return 0; } If you want it to do something a little more meaningful try int ftime(struct timeb *tp) { time(tp->time); tp->millitm=0; tp->timezone=0; tp->dstflag=0; return 0; } This of course assumes that time() is defined on your machines. I don't see any trouble in setting tp->millitm to 0 as this is the same as glibc2.0 did as all it will do is reduce the accuracy of your timings which I can't see as very damaging. dstflag is the Day Light savings flag and can be got from ctime() if you really care about it. timezone is hours off GMT and if you were really bothered you could work out - but I don't think the code uses it so ... Actaully, I seem to recall that Solaris 2.3 had an alignment problem with with timeb structure which would cause time(tp->time) to core dump so you might want something like int ftime(strunct timeb *tp) { time_t fix; time(&fix); tp->time=fix; tp->millitm=tp->timezone=tp->dstflag=0; return 0; } Stuart (waiting for somebody to tell me that the obvious solution is really silly) -----Original Message----- From: Dave Encisco [mailto:[EMAIL PROTECTED]] Sent: 13 November 2001 19:53 To: [EMAIL PROTECTED] Subject: Solaris 2.3 and ftime (2nd try) Hello again. I didn't get any responses regarding the "undefined reference to ftime" while compiling openssl on a Solaris 2.3 OS. I guess either no one has done it or no one has had a similar problem. Just in case someone missed my original post, here it is again. Thanks in advance! Dave ======================================================== Hi, I've recently inherited a lab with old Sparc 5s and 2s running Solaris 2.3. The researcher won't let me upgrade the OS or replace some of the machines...*&^$! Nevertheless, I upgraded the compiler to gcc 3.0.2 and started to install openssl-0.9.6b. Unfortunately I've run into the infamous "undefined reference to `ftime'" that's plaguing the Mac OS X admins. Here's where things break: speed.o: In function `Time_F': /export/home/unixsys/openssl-0.9.6b/apps/speed.c:294: undefined reference to `ftime' /export/home/unixsys/openssl-0.9.6b/apps/speed.c:299: undefined reference to `ftime' collect2: ld returned 1 exit status make[1]: *** [openssl] Error 1 make[1]: Leaving directory `/export/home/unixsys/openssl-0.9.6b/apps' gmake: *** [sub_all] Error 1 Looking at speed.c 289 static struct timeb tstart,tend; 290 long i; 291 292 if (s == START) 293 { 294 ftime(&tstart); 295 return(0); 296 } 297 else 298 { 299 ftime(&tend); 300 i=(long)tend.millitm-(long)tstart.millitm; 301 ret=((double)(tend.time-tstart.time))+((double)i)/1000.0; 302 return((ret < 0.001)?0.001:ret); What's the fix? Trash the machines ;-). Thanks, Dave =========================================== Dave Encisco [EMAIL PROTECTED] [EMAIL PROTECTED] =========================================== ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED] ______________________________________________________________________ OpenSSL Project http://www.openssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]