mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "S.Çağlar Onur" <caglar@pardus.org.tr>
To: linux-kernel@vger.kernel.org
Cc: davem@davemloft.net, Linus Torvalds <torvalds@linux-foundation.org>
Subject: [PATCH] Fix hci_sock build with CONFIG_COMPAT=n
Date: Wed, 12 Sep 2007 11:59:48 +0300	[thread overview]
Message-ID: <200709121159.49183.caglar@pardus.org.tr> (raw)

Hi;

Commit 66eb50d5c972cc16df2be730497b7f06d75d8132 introduces runtime check of CONFIG_COMPAT but without following patch compiliation failed with following error;

...
  CC [M]  net/bluetooth/hci_event.o
  CC [M]  net/bluetooth/hci_sock.o
net/bluetooth/hci_sock.c: In function `hci_sock_cmsg':
net/bluetooth/hci_sock.c:352: error: storage size of 'ctv' isn't known
net/bluetooth/hci_sock.c:352: warning: unused variable `ctv'
make[2]: *** [net/bluetooth/hci_sock.o] Hata 1
make[1]: *** [net/bluetooth] Hata 2
make: *** [net] Hata 2

Signed-off-by: S.Çağlar Onur <caglar@pardus.org.tr>

 net/bluetooth/hci_sock.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c
index d16ca8e..1364a90 100644
--- a/net/bluetooth/hci_sock.c
+++ b/net/bluetooth/hci_sock.c
@@ -347,7 +347,7 @@ static inline void hci_sock_cmsg(struct sock *sk, struct msghdr *msg, struct sk_
 		int len;
 
 		skb_get_timestamp(skb, &tv);
-
+#ifdef CONFIG_COMPAT
 		if (msg->msg_flags & MSG_CMSG_COMPAT) {
 			struct compat_timeval ctv;
 			ctv.tv_sec = tv.tv_sec;
@@ -355,9 +355,12 @@ static inline void hci_sock_cmsg(struct sock *sk, struct msghdr *msg, struct sk_
 			data = &ctv;
 			len = sizeof(ctv);
 		} else {
+#endif
 			data = &tv;
 			len = sizeof(tv);
+#ifdef CONFIG_COMPAT
 		}
+#endif
 
 		put_cmsg(msg, SOL_HCI, HCI_CMSG_TSTAMP, len, data);
 	}


Cheers
-- 
S.Çağlar Onur <caglar@pardus.org.tr>
http://cekirdek.pardus.org.tr/~caglar/

Linux is like living in a teepee. No Windows, no Gates and an Apache in house!

                 reply	other threads:[~2007-09-12  9:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200709121159.49183.caglar@pardus.org.tr \
    --to=caglar@pardus.org.tr \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome