Re: hci_sock.c build failure

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: David Miller
Date: Wednesday, September 12, 2007 - 5:12 am

From: Greg KH <greg@kroah.com>
Date: Wed, 12 Sep 2007 05:02:53 -0700


I'll push the following fix to Linus.

From 1da97f83a843f92678b614fcaebdb3e4ebd6c9dd Mon Sep 17 00:00:00 2001
From: David S. Miller <davem@kimchee.(none)>
Date: Wed, 12 Sep 2007 14:10:58 +0200
Subject: [PATCH] [BLUETOOTH]: Fix non-COMPAT build of hci_sock.c

Signed-off-by: David S. Miller <davem@davemloft.net>
---
 net/bluetooth/hci_sock.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c
index d16ca8e..5ccea5f 100644
--- a/net/bluetooth/hci_sock.c
+++ b/net/bluetooth/hci_sock.c
@@ -348,16 +348,17 @@ static inline void hci_sock_cmsg(struct sock *sk, struct msghdr *msg, struct sk_
 
 		skb_get_timestamp(skb, &tv);
 
+		data = &tv;
+		len = sizeof(tv);
+#ifdef CONFIG_COMPAT
 		if (msg->msg_flags & MSG_CMSG_COMPAT) {
 			struct compat_timeval ctv;
 			ctv.tv_sec = tv.tv_sec;
 			ctv.tv_usec = tv.tv_usec;
 			data = &ctv;
 			len = sizeof(ctv);
-		} else {
-			data = &tv;
-			len = sizeof(tv);
 		}
+#endif
 
 		put_cmsg(msg, SOL_HCI, HCI_CMSG_TSTAMP, len, data);
 	}
-- 
1.5.2.4

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
hci_sock.c build failure, Andre Haupt, (Wed Sep 12, 2:29 am)
Re: hci_sock.c build failure, Greg KH, (Wed Sep 12, 5:02 am)
Re: hci_sock.c build failure, Greg KH, (Wed Sep 12, 5:04 am)
Re: hci_sock.c build failure, Greg KH, (Wed Sep 12, 5:07 am)
Re: hci_sock.c build failure, caglar, (Wed Sep 12, 5:10 am)
Re: hci_sock.c build failure, David Miller, (Wed Sep 12, 5:12 am)
Re: hci_sock.c build failure, David Miller, (Wed Sep 12, 5:13 am)
Re: hci_sock.c build failure, David Miller, (Wed Sep 12, 5:14 am)
Re: hci_sock.c build failure, Robert P. J. Day, (Wed Sep 12, 5:16 am)
Re: hci_sock.c build failure, Coly Li, (Wed Sep 12, 7:20 am)
Re: hci_sock.c build failure, Coly Li, (Wed Sep 12, 7:26 am)
Re: hci_sock.c build failure, Marcel Holtmann, (Wed Sep 12, 9:20 am)