From: "Aníbal Monsalve Salazar" <anibal@debian.org>
To: linux-nfs@vger.kernel.org
Subject: Re: librpcsecgss: FTBFS on GNU/kFreeBSD
Date: Sun, 24 Nov 2013 16:19:04 +1100 [thread overview]
Message-ID: <20131124051904.GA16651@master.debian.org> (raw)
In-Reply-To: <20090703133142.14887.33854.reportbug@localhost.localdomain>
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@lists.alioth.debian.org
> 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@debian.org>
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@debian.org>
---
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
next parent reply other threads:[~2013-11-24 5:19 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20090703133142.14887.33854.reportbug@localhost.localdomain>
2013-11-24 5:19 ` Aníbal Monsalve Salazar [this message]
2013-11-24 9:09 ` librpcsecgss: FTBFS on GNU/kFreeBSD Christoph Hellwig
2013-11-24 13:07 ` Jim Rees
2013-11-24 13:29 ` Christoph Hellwig
2013-12-04 13:13 ` Christoph Hellwig
2013-12-04 17:14 ` Chuck Lever
2013-12-04 17:53 ` Trond Myklebust
2013-12-04 18:14 ` Chuck Lever
2013-12-05 13:23 ` Christoph Hellwig
2013-12-05 13:41 ` Trond Myklebust
2013-12-05 13:43 ` Christoph Hellwig
2013-12-05 13:45 ` Trond Myklebust
2013-12-05 16:37 ` Steve Dickson
2013-12-10 6:27 ` NeilBrown
2013-12-05 16:15 ` Jim Rees
2013-12-04 18:24 ` J. Bruce Fields
2013-12-04 18:27 ` Chuck Lever
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131124051904.GA16651@master.debian.org \
--to=anibal@debian.org \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.