OSDN Git Service

compat: Use COMPAT_USE_64BIT_TIME in the Bluetooth subsystem
authorH. J. Lu <hjl.tools@gmail.com>
Fri, 10 Feb 2012 22:12:15 +0000 (14:12 -0800)
committerH. Peter Anvin <hpa@zytor.com>
Mon, 20 Feb 2012 20:48:47 +0000 (12:48 -0800)
Enable the Bluetooth subsystem to be used with a compat ABI with
64-bit time.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Marcel Holtmann <marcel@holtmann.org>
Cc: Gustavo F. Padovan <padovan@profusion.mobi>
Cc: David S. Miller <davem@davemloft.net>
net/bluetooth/hci_sock.c

index 0dcc962..b2eb2b9 100644 (file)
@@ -418,7 +418,8 @@ static inline void hci_sock_cmsg(struct sock *sk, struct msghdr *msg, struct sk_
                data = &tv;
                len = sizeof(tv);
 #ifdef CONFIG_COMPAT
-               if (msg->msg_flags & MSG_CMSG_COMPAT) {
+               if (!COMPAT_USE_64BIT_TIME &&
+                   (msg->msg_flags & MSG_CMSG_COMPAT)) {
                        ctv.tv_sec = tv.tv_sec;
                        ctv.tv_usec = tv.tv_usec;
                        data = &ctv;