Re: librpcsecgss: FTBFS on GNU/kFreeBSD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 03, 2009 at 03:31:42PM +0200, Cyril Brulebois wrote:
> Package: librpcsecgss
> Version: 0.18-1
> Severity: important
> Tags: patch pending
> User: glibc-bsd-devel@xxxxxxxxxxxxxxxxxxxxxxx
> Usertags: kfreebsd
> 
> Hi,
> 
> please find attached a trivial patch to fix the FTBFS on GNU/kFreeBSD:
> [...] 

I've carried the patch below in Debian for a long time. Please consider
merging it.

>From dc2b55a7f83d6c505ba79b83089f365bb0c24bf1 Mon Sep 17 00:00:00 2001
From: Cyril Brulebois <kibi@xxxxxxxxxx>
Date: Fri, 3 Jul 2009 15:31:42 +0200
Subject: librpcsecgss: FTBFS on GNU/kFreeBSD

Fix FTBFS on GNU/kFreeBSD by using getpid() (rather than arc4random())                                                               
not only if __linux__ is defined, but also if __GLIBC__ is defined.

Signed-off-by: Anibal Monsalve Salazar <anibal@xxxxxxxxxx>
---
 src/clnt_tcp.c | 2 +-
 src/clnt_udp.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/clnt_tcp.c b/src/clnt_tcp.c
index 4da0d31..f2c3da0 100644
--- a/src/clnt_tcp.c
+++ b/src/clnt_tcp.c
@@ -225,7 +225,7 @@ clnttcp_create(raddr, prog, vers, sockp, sendsz, recvsz)
 	 * Initialize call message
 	 */
 	(void)gettimeofday(&now, (struct timezone *)0);
-#ifdef __linux__
+#if defined (__linux__) || defined(__GLIBC__)
 	call_msg.rm_xid = getpid() ^ now.tv_sec ^ now.tv_usec;
 #else
 	call_msg.rm_xid = arc4random();
diff --git a/src/clnt_udp.c b/src/clnt_udp.c
index fc803b2..fe95ed2 100644
--- a/src/clnt_udp.c
+++ b/src/clnt_udp.c
@@ -153,7 +153,7 @@ clntudp_bufcreate(raddr, program, version, wait, sockp, sendsz, recvsz)
 	cu->cu_total.tv_usec = -1;
 	cu->cu_sendsz = sendsz;
 	cu->cu_recvsz = recvsz;
-#ifdef __linux__
+#if defined (__linux__) || defined(__GLIBC__)
 	call_msg.rm_xid = getpid() ^ now.tv_sec ^ now.tv_usec;
 #else
 	call_msg.rm_xid = arc4random();
-- 
1.8.4.2

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux