Hi,

I had a number of compilation problems with packages when linking to
libressl that I could trace back to the appearance of a "main" symbol
in libcrypto.so.

I'm far from an expert in dynamic linking and so-files, but afaik
libraries shouldn't have a main function symbol. It came from
getentropy_linux.c and wasn't really a function, just a stub of it.

Removing it did the trick for me. Is this the right approach? (see
patch attached)


cu,
-- 
Hanno Böck
http://hboeck.de/

mail/jabber: [email protected]
GPG: BBB51E42
--- libressl-2.0.0/crypto/compat/getentropy_linux.c	2014-07-11 19:41:25.000000000 +0200
+++ libressl-2.0.0-1/crypto/compat/getentropy_linux.c	2014-07-12 10:09:08.630076633 +0200
@@ -66,7 +66,6 @@
 
 int	getentropy(void *buf, size_t len);
 
-extern int main(int, char *argv[]);
 static int gotdata(char *buf, size_t len);
 static int getentropy_urandom(void *buf, size_t len);
 #ifdef CTL_MAXNAME
@@ -339,7 +338,6 @@
 			HX(sigprocmask(SIG_BLOCK, NULL, &sigset) == -1,
 			    sigset);
 
-			HD(main);		/* an addr in program */
 			HD(getentropy);	/* an addr in this library */
 			HD(printf);		/* an addr in libc */
 			p = (char *)&p;

Attachment: signature.asc
Description: PGP signature

Reply via email to