2010年1月27日 星期三

OpenSSL compile error with timeb.h

I could build openssl-0.9.8i and 0.9.8l with adding UCLIBC_SUSV3_LEGACY and UCLIBC_SUSV3_LEGACY_MACROS to uClibc config
http://old.nabble.com/OpenSSL-compile-problems-td20915267.html

/mnt/buildroot/buildroot/build_i686/staging_dir/usr/bin/i686-linux-uclibc-gcc
-DMONOLITH -I.. -I../include -fPIC -DOPENSSL_PIC -DZLIB_SHARED -DZLIB
-DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DTERMIO -O3
-fomit-frame-pointer -Wall -c -o speed.o speed.c
speed.c:147:23: sys/timeb.h: No such file or directory
speed.c: In function `Time_F':
speed.c:445: error: storage size of 'tstart' isn't known
speed.c:445: error: storage size of 'tend' isn't known
speed.c:451: warning: implicit declaration of function `ftime'
speed.c:445: warning: unused variable `tstart'
speed.c:445: warning: unused variable `tend'
make[2]: *** [speed.o] Error 1

(.......................)

If you're using uclibc-0.9.30 (or new-ish snapshot) you need to enable SUSV3_LEGACY support in it (UCLIBC_SUSV3_LEGACY & UCLIBC_SUSV3_LEGACY_MACROS).

沒有留言: