[gnutls-devel] portability problem in gnutls-3.2.7: rpl_strerror missing

Thomas Klausner wiz at NetBSD.org
Fri Nov 29 23:14:22 CET 2013


On Fri, Nov 29, 2013 at 07:03:20PM +0100, Andreas Metzler wrote:
> http://lists.gnupg.org/pipermail/gnutls-devel/2013-November/006588.html

Thanks.

I tried what the post suggests, but still get:

../lib/.libs/libgnutls.so: undefined reference to `rpl_strerror'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
../lib/.libs/libgnutls.so: undefined reference to `rpl_strerror'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Makefile:1832: recipe for target 'srptool' failed
gmake[4]: *** [srptool] Error 1
gmake[4]: *** Waiting for unfinished jobs....
Makefile:1828: recipe for target 'psktool' failed
gmake[4]: *** [psktool] Error 1

I'll attach the patch I've used.
 Thomas
-------------- next part --------------
$NetBSD$

http://lists.gnupg.org/pipermail/gnutls-devel/2013-November/006588.html

--- lib/nettle/egd.c.orig	2013-11-10 17:59:14.000000000 +0000
+++ lib/nettle/egd.c
@@ -155,12 +155,10 @@ int _rndegd_connect_socket(void)
 
 	fd = socket(LOCAL_SOCKET_TYPE, SOCK_STREAM, 0);
 	if (fd == -1) {
-		_gnutls_debug_log("can't create unix domain socket: %s\n",
-				  strerror(errno));
+		_gnutls_debug_log("can't create unix domain socket\n");
 		return -1;
 	} else if (connect(fd, (struct sockaddr *) &addr, addr_len) == -1) {
-		_gnutls_debug_log("can't connect to EGD socket `%s': %s\n",
-				  name, strerror(errno));
+		_gnutls_debug_log("can't connect to EGD socket `%s'\n", name);
 		close(fd);
 		fd = -1;
 	}
@@ -202,13 +200,11 @@ int _rndegd_read(int *fd, void *_output,
 	buffer[1] = nbytes;
 
 	if (do_write(*fd, buffer, 2) == -1)
-		_gnutls_debug_log("can't write to the EGD: %s\n",
-				  strerror(errno));
+		_gnutls_debug_log("can't write to the EGD\n");
 
 	n = do_read(*fd, buffer, 1);
 	if (n == -1) {
-		_gnutls_debug_log("read error on EGD: %s\n",
-				  strerror(errno));
+		_gnutls_debug_log("read error on EGD\n");
 		do_restart = 1;
 		goto restart;
 	}
@@ -217,8 +213,7 @@ int _rndegd_read(int *fd, void *_output,
 	if (n) {
 		n = do_read(*fd, buffer, n);
 		if (n == -1) {
-			_gnutls_debug_log("read error on EGD: %s\n",
-					  strerror(errno));
+			_gnutls_debug_log("read error on EGD\n");
 			do_restart = 1;
 			goto restart;
 		}
@@ -240,12 +235,10 @@ int _rndegd_read(int *fd, void *_output,
 		buffer[0] = 2;	/* blocking */
 		buffer[1] = nbytes;
 		if (do_write(*fd, buffer, 2) == -1)
-			_gnutls_debug_log("can't write to the EGD: %s\n",
-					  strerror(errno));
+			_gnutls_debug_log("can't write to the EGD\n");
 		n = do_read(*fd, buffer, nbytes);
 		if (n == -1) {
-			_gnutls_debug_log("read error on EGD: %s\n",
-					  strerror(errno));
+			_gnutls_debug_log("read error on EGD\n");
 			do_restart = 1;
 			goto restart;
 		}


More information about the Gnutls-devel mailing list