After I commented out the strerror declaration from tls.c and I downgraded my openssl from 0.9.8 to 0.9.7g, the compilation completed successfully.

But tls.c compilation issued the following warning:

./compile tls.c
tls.c: In function `ssl_strerror':
tls.c:25: warning: pointer/integer type mismatch in conditional expression


And in the line 25, I see an attribution using the commented function:

line 25:  return errno == error_timeout ? "timed out" : strerror(errno);

I don't know if I can trust in this tls compilation...

See you,
bnegrao

----- Original Message ----- From: "Bruno Negrao" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, September 20, 2005 8:35 AM
Subject: Re: [toaster] tls.c:12: conflicting types for `strerror'


NEOFEMA s.r.o.They don't appear to be the same:

# grep strerror tls.c
const char *strerror(int);

# grep strerror /usr/include/string.h
extern char *strerror (int __errnum) __THROW;

Just for testing i commented out the strerror declaration from tls.c, and it compiled, but quickly the compilation failed again in another part:

[EMAIL PROTECTED] netqmail-1.05]# make
./compile tls.c
./compile ssl_timeoutio.c
./load qmail-remote control.o constmap.o timeoutread.o \
timeoutwrite.o timeoutconn.o tcpto.o now.o dns.o ip.o \
tls.o ssl_timeoutio.o -L/usr/local/ssl/lib -lssl -lcrypto \
ipalloc.o strsalloc.o ipme.o quote.o ndelay.a case.a sig.a open.a \
lock.a seek.a getln.a stralloc.a alloc.a substdio.a error.a \
str.a fs.a auto_qmail.o  `cat dns.lib` `cat socket.lib`
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x38): In function `dlfcn_load':
: undefined reference to `dlopen'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x97): In function `dlfcn_load':
: undefined reference to `dlclose'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0xc1): In function `dlfcn_load':
: undefined reference to `dlerror'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x154): In function `dlfcn_bind_var':
: undefined reference to `dlsym'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x181): In function `dlfcn_bind_var':
: undefined reference to `dlerror'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x254): In function `dlfcn_bind_func':
: undefined reference to `dlsym'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x281): In function `dlfcn_bind_func':
: undefined reference to `dlerror'
/usr/local/ssl/lib/libcrypto.a(dso_dlfcn.o)(.text+0x559): In function `dlfcn_unload':
: undefined reference to `dlclose'
collect2: ld returned 1 exit status
make: *** [qmail-remote] Error 1


Why am I the only one that have two declarations of strerror? I'm using glibc-devel-2.3.2-11.9, does it have a bug?

Thank you,
bruno.



----- Original Message ----- From: Neofema tech
To: [email protected]
Sent: Tuesday, September 20, 2005 3:00 AM
Subject: Re: [toaster] tls.c:12: conflicting types for `strerror'


Bit strange but ... compare both strerror declaration and if the same - delete the one located in tls.c ? :)

R.




./compile tls.c
tls.c:12: conflicting types for `strerror'
/usr/include/string.h:243: previous declaration of `strerror'
make: *** [tls.o] Error 1

This error doesn't seem to be related with the ssl includes at this point. The compiler is complaining because the tls.c file declares the sterror function which is declared also in "string.h" include file.

Does it have solution?

Thank you,
bnegrao


Reply via email to