* [Buildroot] [PATCH] neard: fix build with kernel headers 3.1 - 3.6
@ 2013-02-16 17:02 Arnout Vandecappelle
2013-02-16 17:34 ` Arnout Vandecappelle
0 siblings, 1 reply; 6+ messages in thread
From: Arnout Vandecappelle @ 2013-02-16 17:02 UTC (permalink / raw)
To: buildroot
From: "Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be>
neard uses the linux/nfc.h header which is fairly recent, so we have a
patch that creates linux-nfc.h and uses it if necessary. However, since
the bump to 0.9, neard uses some symbols that are introduced in linux 3.7
so the build fails with headers 3.1 (which introduced nfc.h) to 3.6.
To resolve that, add a check for one of the newly introduced symbols
(that is used by neard).
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
Probably wanted for 2013.02.
I selected the symbol to check for with 'git log -p v3.7 include/linux/nfc.h'
in the kernel.
---
| 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
--git a/package/neard/neard-fix-missing-linux-nfc-header.patch b/package/neard/neard-fix-missing-linux-nfc-header.patch
index b04c5da..cb9a701 100644
--- a/package/neard/neard-fix-missing-linux-nfc-header.patch
+++ b/package/neard/neard-fix-missing-linux-nfc-header.patch
@@ -8,17 +8,23 @@ As a workaround until all reasonable toolchains get this header
included, add a configure check in neard to test whether this header
is available or not, and if not, use our own private copy of it.
+Since symbols from the v3.7 kernel header are used, but linux/nfc.h
+already exists since the v3.1 kernel, check for one of the most
+recently added symbols: NFC_LLCP_RAW_HEADER_SIZE.
+
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Index: b/configure.ac
===================================================================
--- a/configure.ac
+++ b/configure.ac
-@@ -88,6 +88,8 @@
+@@ -88,6 +88,9 @@
AC_SUBST(NETLINK_CFLAGS)
AC_SUBST(NETLINK_LIBS)
-+AC_CHECK_HEADER(linux/nfc.h, [AC_DEFINE(HAVE_LINUX_NFC_H, 1, [Defines if linux/nfc.h header is available])], [], [#include <sys/socket.h>])
++AC_TRY_COMPILE([#include <linux/nfc.h>], [int err[[NFC_LLCP_RAW_HEADER_SIZE-2]];],
++ [AC_DEFINE(HAVE_LINUX_NFC_H, 1, [Defines if linux/nfc.h header is available])], [])
+
AC_ARG_ENABLE(test, AC_HELP_STRING([--enable-test],
[enable test/example scripts]),
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] neard: fix build with kernel headers 3.1 - 3.6
2013-02-16 17:02 [Buildroot] [PATCH] neard: fix build with kernel headers 3.1 - 3.6 Arnout Vandecappelle
@ 2013-02-16 17:34 ` Arnout Vandecappelle
2013-02-17 22:11 ` Peter Korsgaard
0 siblings, 1 reply; 6+ messages in thread
From: Arnout Vandecappelle @ 2013-02-16 17:34 UTC (permalink / raw)
To: buildroot
From: "Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be>
neard uses the linux/nfc.h header which is fairly recent, so we have a
patch that creates linux-nfc.h and uses it if necessary. However, since
the bump to 0.9, neard uses some symbols that are introduced in linux 3.7
so the build fails with headers 3.1 (which introduced nfc.h) to 3.6.
To resolve that, add a check for one of the newly introduced symbols
(that is used by neard).
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
v2: Forgot to include <sys/socket.h>.
Probably wanted for 2013.02.
I selected the symbol to check for with 'git log -p v3.7 include/linux/nfc.h'
in the kernel.
---
| 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
--git a/package/neard/neard-fix-missing-linux-nfc-header.patch b/package/neard/neard-fix-missing-linux-nfc-header.patch
index b04c5da..377269e 100644
--- a/package/neard/neard-fix-missing-linux-nfc-header.patch
+++ b/package/neard/neard-fix-missing-linux-nfc-header.patch
@@ -8,17 +8,26 @@ As a workaround until all reasonable toolchains get this header
included, add a configure check in neard to test whether this header
is available or not, and if not, use our own private copy of it.
+Since symbols from the v3.7 kernel header are used, but linux/nfc.h
+already exists since the v3.1 kernel, check for one of the most
+recently added symbols: NFC_LLCP_RAW_HEADER_SIZE.
+
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Index: b/configure.ac
===================================================================
--- a/configure.ac
+++ b/configure.ac
-@@ -88,6 +88,8 @@
+@@ -88,6 +88,12 @@
AC_SUBST(NETLINK_CFLAGS)
AC_SUBST(NETLINK_LIBS)
-+AC_CHECK_HEADER(linux/nfc.h, [AC_DEFINE(HAVE_LINUX_NFC_H, 1, [Defines if linux/nfc.h header is available])], [], [#include <sys/socket.h>])
++AC_TRY_COMPILE([
++#include <sys/socket.h>
++#include <linux/nfc.h>
++ ], [int err[NFC_LLCP_RAW_HEADER_SIZE-2];],
++ [AC_DEFINE(HAVE_LINUX_NFC_H, 1, [Defines if linux/nfc.h header is available])], [])
+
AC_ARG_ENABLE(test, AC_HELP_STRING([--enable-test],
[enable test/example scripts]),
--
1.7.10.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] neard: fix build with kernel headers 3.1 - 3.6
2013-02-16 17:34 ` Arnout Vandecappelle
@ 2013-02-17 22:11 ` Peter Korsgaard
2013-02-18 7:27 ` Arnout Vandecappelle
0 siblings, 1 reply; 6+ messages in thread
From: Peter Korsgaard @ 2013-02-17 22:11 UTC (permalink / raw)
To: buildroot
>>>>> "Arnout" == Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> writes:
Arnout> From: "Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be>
Arnout> neard uses the linux/nfc.h header which is fairly recent, so we have a
Arnout> patch that creates linux-nfc.h and uses it if necessary. However, since
Arnout> the bump to 0.9, neard uses some symbols that are introduced in linux 3.7
Arnout> so the build fails with headers 3.1 (which introduced nfc.h) to 3.6.
Arnout> To resolve that, add a check for one of the newly introduced symbols
Arnout> (that is used by neard).
Arnout> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Arnout> ---
Arnout> v2: Forgot to include <sys/socket.h>.
Arnout> Probably wanted for 2013.02.
Committed, thanks. Don't forget to send upstream.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] neard: fix build with kernel headers 3.1 - 3.6
2013-02-17 22:11 ` Peter Korsgaard
@ 2013-02-18 7:27 ` Arnout Vandecappelle
2013-02-25 10:40 ` Thomas Petazzoni
0 siblings, 1 reply; 6+ messages in thread
From: Arnout Vandecappelle @ 2013-02-18 7:27 UTC (permalink / raw)
To: buildroot
On 17/02/13 23:11, Peter Korsgaard wrote:
>>>>>> "Arnout" == Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> writes:
>
> Arnout> From: "Arnout Vandecappelle (Essensium/Mind)" <arnout@mind.be>
> Arnout> neard uses the linux/nfc.h header which is fairly recent, so we have a
> Arnout> patch that creates linux-nfc.h and uses it if necessary. However, since
> Arnout> the bump to 0.9, neard uses some symbols that are introduced in linux 3.7
> Arnout> so the build fails with headers 3.1 (which introduced nfc.h) to 3.6.
>
> Arnout> To resolve that, add a check for one of the newly introduced symbols
> Arnout> (that is used by neard).
>
> Arnout> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> Arnout> ---
> Arnout> v2: Forgot to include <sys/socket.h>.
>
> Arnout> Probably wanted for 2013.02.
>
> Committed, thanks. Don't forget to send upstream.
Thomas, did you ever send the original patch upstream?
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] neard: fix build with kernel headers 3.1 - 3.6
2013-02-18 7:27 ` Arnout Vandecappelle
@ 2013-02-25 10:40 ` Thomas Petazzoni
2013-02-25 20:41 ` Arnout Vandecappelle
0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2013-02-25 10:40 UTC (permalink / raw)
To: buildroot
Dear Arnout Vandecappelle,
On Mon, 18 Feb 2013 08:27:14 +0100, Arnout Vandecappelle wrote:
> > Committed, thanks. Don't forget to send upstream.
>
> Thomas, did you ever send the original patch upstream?
No, I did not. Since the patch carries an entire copy of the kernel
header, I am fairly sure that upstream will not be very interested.
Best regards,
Thomas
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] neard: fix build with kernel headers 3.1 - 3.6
2013-02-25 10:40 ` Thomas Petazzoni
@ 2013-02-25 20:41 ` Arnout Vandecappelle
0 siblings, 0 replies; 6+ messages in thread
From: Arnout Vandecappelle @ 2013-02-25 20:41 UTC (permalink / raw)
To: buildroot
On 25/02/13 11:40, Thomas Petazzoni wrote:
> Dear Arnout Vandecappelle,
>
> On Mon, 18 Feb 2013 08:27:14 +0100, Arnout Vandecappelle wrote:
>
>>> Committed, thanks. Don't forget to send upstream.
>>
>> Thomas, did you ever send the original patch upstream?
>
> No, I did not. Since the patch carries an entire copy of the kernel
> header, I am fairly sure that upstream will not be very interested.
In that case I won't upstream my patch either :-)
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-02-25 20:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-16 17:02 [Buildroot] [PATCH] neard: fix build with kernel headers 3.1 - 3.6 Arnout Vandecappelle
2013-02-16 17:34 ` Arnout Vandecappelle
2013-02-17 22:11 ` Peter Korsgaard
2013-02-18 7:27 ` Arnout Vandecappelle
2013-02-25 10:40 ` Thomas Petazzoni
2013-02-25 20:41 ` Arnout Vandecappelle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox