All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix bluetooth.h compilation error with strict C
@ 2016-01-29 20:30 Ankur Tyagi
  2016-02-01 22:03 ` Denys Dmytriyenko
  0 siblings, 1 reply; 7+ messages in thread
From: Ankur Tyagi @ 2016-01-29 20:30 UTC (permalink / raw)
  To: meta-arago

[-- Attachment #1: Type: text/plain, Size: 2942 bytes --]

This patch fixes the compilation error of bluetooth.h on fido branch

regards
Ankur

Signed-off-by: Ankur Tyagi <ankur.tyagi@gallagher.com>
---
 .../0001-strict-C-compilation-error-fix.patch      | 41
++++++++++++++++++++++
 .../bluez/bluez4_4.101.bbappend                    |  1 +
 2 files changed, 42 insertions(+)
 create mode 100644
meta-arago-distro/recipes-connectivity/bluez/bluez4/0001-strict-C-compilation-error-fix.patch

diff --git
a/meta-arago-distro/recipes-connectivity/bluez/bluez4/0001-strict-C-compilation-error-fix.patch
b/meta-arago-distro/recipes-connectivity/bluez/bluez4/0001-strict-C-compilation-error-fix.patch
new file mode 100644
index 0000000..c2cac24
--- /dev/null
+++
b/meta-arago-distro/recipes-connectivity/bluez/bluez4/0001-strict-C-compilation-error-fix.patch
@@ -0,0 +1,41 @@
+From d7fab1e161c2344875b1b0a2363f1f62efdd6cd4 Mon Sep 17 00:00:00 2001
+From: Ankur Tyagi <ankur.tyagi@gallagher.com>
+Date: Thu, 14 Jan 2016 18:12:23 +1300
+Subject: [PATCH 1/1] strict C compilation error fix
+
+Signed-off-by: Ankur Tyagi <ankur.tyagi@gallagher.com>
+---
+ lib/bluetooth.h | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/lib/bluetooth.h b/lib/bluetooth.h
+index 0fc4508..449431d 100644
+--- a/lib/bluetooth.h
++++ b/lib/bluetooth.h
+@@ -138,18 +138,18 @@ enum {
+
+ /* Bluetooth unaligned access */
+ #define bt_get_unaligned(ptr)            \
+-({                        \
++__extension__ ({                \
+    struct __attribute__((packed)) {    \
+-        typeof(*(ptr)) __v;        \
+-    } *__p = (typeof(__p)) (ptr);        \
++        __typeof__(*(ptr)) __v;        \
++    } *__p = (__typeof__(__p)) (ptr);    \
+    __p->__v;                \
+ })
+
+ #define bt_put_unaligned(val, ptr)        \
+ do {                        \
+    struct __attribute__((packed)) {    \
+-        typeof(*(ptr)) __v;        \
+-    } *__p = (typeof(__p)) (ptr);        \
++        __typeof__(*(ptr)) __v;        \
++    } *__p = (__typeof__(__p)) (ptr);    \
+    __p->__v = (val);            \
+ } while(0)
+
+--
+1.9.1
+
diff --git
a/meta-arago-distro/recipes-connectivity/bluez/bluez4_4.101.bbappend
b/meta-arago-distro/recipes-connectivity/bluez/bluez4_4.101.bbappend
index d111425..acda4ee 100644
--- a/meta-arago-distro/recipes-connectivity/bluez/bluez4_4.101.bbappend
+++ b/meta-arago-distro/recipes-connectivity/bluez/bluez4_4.101.bbappend
@@ -5,6 +5,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 SRC_URI +=
"file://bluez4-fix-synchronization-between-bluetoothd-and-dr.patch \
             file://0001-socket-enable-for-bluez-4_98.patch \
             file://0001-bluez-enable-source-interface.patch \
+            file://0001-strict-C-compilation-error-fix.patch \
 "
 # udev 150-170 provide its on hid2hci tool and udev rules for it.
Therefore,
 # disabling hid2hci from bluez4.
--

[-- Attachment #2: Type: text/html, Size: 3447 bytes --]

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] Fix bluetooth.h compilation error with strict C
  2016-01-29 20:30 [PATCH] Fix bluetooth.h compilation error with strict C Ankur Tyagi
@ 2016-02-01 22:03 ` Denys Dmytriyenko
  2016-02-01 22:38   ` Ankur Tyagi
  0 siblings, 1 reply; 7+ messages in thread
From: Denys Dmytriyenko @ 2016-02-01 22:03 UTC (permalink / raw)
  To: Ankur Tyagi; +Cc: meta-arago

Can you please specify:
* what combination of setup and toolchain causes the error (not seen here)
* where this patch comes from
* update Upstream-Status: field accordingly[1]

[1] http://openembedded.org/wiki/Commit_Patch_Message_Guidelines#Patch_Header_Recommendations

-- 
Denys


On Sat, Jan 30, 2016 at 09:30:22AM +1300, Ankur Tyagi wrote:
> This patch fixes the compilation error of bluetooth.h on fido branch
> 
> regards
> Ankur
> 
> Signed-off-by: Ankur Tyagi <ankur.tyagi@gallagher.com>
> ---
>  .../0001-strict-C-compilation-error-fix.patch      | 41
> ++++++++++++++++++++++
>  .../bluez/bluez4_4.101.bbappend                    |  1 +
>  2 files changed, 42 insertions(+)
>  create mode 100644
> meta-arago-distro/recipes-connectivity/bluez/bluez4/0001-strict-C-compilation-error-fix.patch
> 
> diff --git
> a/meta-arago-distro/recipes-connectivity/bluez/bluez4/0001-strict-C-compilation-error-fix.patch
> b/meta-arago-distro/recipes-connectivity/bluez/bluez4/0001-strict-C-compilation-error-fix.patch
> new file mode 100644
> index 0000000..c2cac24
> --- /dev/null
> +++
> b/meta-arago-distro/recipes-connectivity/bluez/bluez4/0001-strict-C-compilation-error-fix.patch
> @@ -0,0 +1,41 @@
> +From d7fab1e161c2344875b1b0a2363f1f62efdd6cd4 Mon Sep 17 00:00:00 2001
> +From: Ankur Tyagi <ankur.tyagi@gallagher.com>
> +Date: Thu, 14 Jan 2016 18:12:23 +1300
> +Subject: [PATCH 1/1] strict C compilation error fix
> +
> +Signed-off-by: Ankur Tyagi <ankur.tyagi@gallagher.com>
> +---
> + lib/bluetooth.h | 10 +++++-----
> + 1 file changed, 5 insertions(+), 5 deletions(-)
> +
> +diff --git a/lib/bluetooth.h b/lib/bluetooth.h
> +index 0fc4508..449431d 100644
> +--- a/lib/bluetooth.h
> ++++ b/lib/bluetooth.h
> +@@ -138,18 +138,18 @@ enum {
> +
> + /* Bluetooth unaligned access */
> + #define bt_get_unaligned(ptr)            \
> +-({                        \
> ++__extension__ ({                \
> +    struct __attribute__((packed)) {    \
> +-        typeof(*(ptr)) __v;        \
> +-    } *__p = (typeof(__p)) (ptr);        \
> ++        __typeof__(*(ptr)) __v;        \
> ++    } *__p = (__typeof__(__p)) (ptr);    \
> +    __p->__v;                \
> + })
> +
> + #define bt_put_unaligned(val, ptr)        \
> + do {                        \
> +    struct __attribute__((packed)) {    \
> +-        typeof(*(ptr)) __v;        \
> +-    } *__p = (typeof(__p)) (ptr);        \
> ++        __typeof__(*(ptr)) __v;        \
> ++    } *__p = (__typeof__(__p)) (ptr);    \
> +    __p->__v = (val);            \
> + } while(0)
> +
> +--
> +1.9.1
> +
> diff --git
> a/meta-arago-distro/recipes-connectivity/bluez/bluez4_4.101.bbappend
> b/meta-arago-distro/recipes-connectivity/bluez/bluez4_4.101.bbappend
> index d111425..acda4ee 100644
> --- a/meta-arago-distro/recipes-connectivity/bluez/bluez4_4.101.bbappend
> +++ b/meta-arago-distro/recipes-connectivity/bluez/bluez4_4.101.bbappend
> @@ -5,6 +5,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
>  SRC_URI +=
> "file://bluez4-fix-synchronization-between-bluetoothd-and-dr.patch \
>              file://0001-socket-enable-for-bluez-4_98.patch \
>              file://0001-bluez-enable-source-interface.patch \
> +            file://0001-strict-C-compilation-error-fix.patch \
>  "
>  # udev 150-170 provide its on hid2hci tool and udev rules for it.
> Therefore,
>  # disabling hid2hci from bluez4.
> --

> _______________________________________________
> meta-arago mailing list
> meta-arago@arago-project.org
> http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Fix bluetooth.h compilation error with strict C
  2016-02-01 22:03 ` Denys Dmytriyenko
@ 2016-02-01 22:38   ` Ankur Tyagi
  2016-02-08 17:49     ` Denys Dmytriyenko
  0 siblings, 1 reply; 7+ messages in thread
From: Ankur Tyagi @ 2016-02-01 22:38 UTC (permalink / raw)
  To: Denys Dmytriyenko; +Cc: meta-arago

[-- Attachment #1: Type: text/plain, Size: 4223 bytes --]

I am using Ubuntu 14.04 x86_64,arago-fido-config,toolchain
gcc-linaro-4.9-2015.05-x86_64_arm-linux-gnueabihf

Patch is available here :
http://git.kernel.org/cgit/bluetooth/bluez.git/commit/?id=cf52a40302d0d20ccca22a7a1f53e46ef8abfca8

I'll update Upstream-Status: Backported

thanks
Ankur

On Tue, Feb 2, 2016 at 11:03 AM, Denys Dmytriyenko <denys@ti.com> wrote:

> Can you please specify:
> * what combination of setup and toolchain causes the error (not seen here)
> * where this patch comes from
> * update Upstream-Status: field accordingly[1]
>
> [1]
> http://openembedded.org/wiki/Commit_Patch_Message_Guidelines#Patch_Header_Recommendations
>
> --
> Denys
>
>
> On Sat, Jan 30, 2016 at 09:30:22AM +1300, Ankur Tyagi wrote:
> > This patch fixes the compilation error of bluetooth.h on fido branch
> >
> > regards
> > Ankur
> >
> > Signed-off-by: Ankur Tyagi <ankur.tyagi@gallagher.com>
> > ---
> >  .../0001-strict-C-compilation-error-fix.patch      | 41
> > ++++++++++++++++++++++
> >  .../bluez/bluez4_4.101.bbappend                    |  1 +
> >  2 files changed, 42 insertions(+)
> >  create mode 100644
> >
> meta-arago-distro/recipes-connectivity/bluez/bluez4/0001-strict-C-compilation-error-fix.patch
> >
> > diff --git
> >
> a/meta-arago-distro/recipes-connectivity/bluez/bluez4/0001-strict-C-compilation-error-fix.patch
> >
> b/meta-arago-distro/recipes-connectivity/bluez/bluez4/0001-strict-C-compilation-error-fix.patch
> > new file mode 100644
> > index 0000000..c2cac24
> > --- /dev/null
> > +++
> >
> b/meta-arago-distro/recipes-connectivity/bluez/bluez4/0001-strict-C-compilation-error-fix.patch
> > @@ -0,0 +1,41 @@
> > +From d7fab1e161c2344875b1b0a2363f1f62efdd6cd4 Mon Sep 17 00:00:00 2001
> > +From: Ankur Tyagi <ankur.tyagi@gallagher.com>
> > +Date: Thu, 14 Jan 2016 18:12:23 +1300
> > +Subject: [PATCH 1/1] strict C compilation error fix
> > +
> > +Signed-off-by: Ankur Tyagi <ankur.tyagi@gallagher.com>
> > +---
> > + lib/bluetooth.h | 10 +++++-----
> > + 1 file changed, 5 insertions(+), 5 deletions(-)
> > +
> > +diff --git a/lib/bluetooth.h b/lib/bluetooth.h
> > +index 0fc4508..449431d 100644
> > +--- a/lib/bluetooth.h
> > ++++ b/lib/bluetooth.h
> > +@@ -138,18 +138,18 @@ enum {
> > +
> > + /* Bluetooth unaligned access */
> > + #define bt_get_unaligned(ptr)            \
> > +-({                        \
> > ++__extension__ ({                \
> > +    struct __attribute__((packed)) {    \
> > +-        typeof(*(ptr)) __v;        \
> > +-    } *__p = (typeof(__p)) (ptr);        \
> > ++        __typeof__(*(ptr)) __v;        \
> > ++    } *__p = (__typeof__(__p)) (ptr);    \
> > +    __p->__v;                \
> > + })
> > +
> > + #define bt_put_unaligned(val, ptr)        \
> > + do {                        \
> > +    struct __attribute__((packed)) {    \
> > +-        typeof(*(ptr)) __v;        \
> > +-    } *__p = (typeof(__p)) (ptr);        \
> > ++        __typeof__(*(ptr)) __v;        \
> > ++    } *__p = (__typeof__(__p)) (ptr);    \
> > +    __p->__v = (val);            \
> > + } while(0)
> > +
> > +--
> > +1.9.1
> > +
> > diff --git
> > a/meta-arago-distro/recipes-connectivity/bluez/bluez4_4.101.bbappend
> > b/meta-arago-distro/recipes-connectivity/bluez/bluez4_4.101.bbappend
> > index d111425..acda4ee 100644
> > --- a/meta-arago-distro/recipes-connectivity/bluez/bluez4_4.101.bbappend
> > +++ b/meta-arago-distro/recipes-connectivity/bluez/bluez4_4.101.bbappend
> > @@ -5,6 +5,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
> >  SRC_URI +=
> > "file://bluez4-fix-synchronization-between-bluetoothd-and-dr.patch \
> >              file://0001-socket-enable-for-bluez-4_98.patch \
> >              file://0001-bluez-enable-source-interface.patch \
> > +            file://0001-strict-C-compilation-error-fix.patch \
> >  "
> >  # udev 150-170 provide its on hid2hci tool and udev rules for it.
> > Therefore,
> >  # disabling hid2hci from bluez4.
> > --
>
> > _______________________________________________
> > meta-arago mailing list
> > meta-arago@arago-project.org
> > http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
>
>

[-- Attachment #2: Type: text/html, Size: 5912 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Fix bluetooth.h compilation error with strict C
  2016-02-01 22:38   ` Ankur Tyagi
@ 2016-02-08 17:49     ` Denys Dmytriyenko
  0 siblings, 0 replies; 7+ messages in thread
From: Denys Dmytriyenko @ 2016-02-08 17:49 UTC (permalink / raw)
  To: Ankur Tyagi; +Cc: meta-arago

Hmm, not seeing this issue with the same cross toolchain, although on Ubuntu 
12.04. Does it fail on native build by any chance? Though we don't build 
bluez-native here... Anyway, if you resubmit with Upstream-Status: Backported, 
I'll take it. Thanks.

-- 
Denys


On Tue, Feb 02, 2016 at 11:38:33AM +1300, Ankur Tyagi wrote:
> I am using Ubuntu 14.04 x86_64,arago-fido-config,toolchain
> gcc-linaro-4.9-2015.05-x86_64_arm-linux-gnueabihf
> 
> Patch is available here :
> http://git.kernel.org/cgit/bluetooth/bluez.git/commit/?id=cf52a40302d0d20ccca22a7a1f53e46ef8abfca8
> 
> I'll update Upstream-Status: Backported
> 
> thanks
> Ankur
> 
> On Tue, Feb 2, 2016 at 11:03 AM, Denys Dmytriyenko <denys@ti.com> wrote:
> 
> > Can you please specify:
> > * what combination of setup and toolchain causes the error (not seen here)
> > * where this patch comes from
> > * update Upstream-Status: field accordingly[1]
> >
> > [1]
> > http://openembedded.org/wiki/Commit_Patch_Message_Guidelines#Patch_Header_Recommendations
> >
> > --
> > Denys
> >
> >
> > On Sat, Jan 30, 2016 at 09:30:22AM +1300, Ankur Tyagi wrote:
> > > This patch fixes the compilation error of bluetooth.h on fido branch
> > >
> > > regards
> > > Ankur
> > >
> > > Signed-off-by: Ankur Tyagi <ankur.tyagi@gallagher.com>
> > > ---
> > >  .../0001-strict-C-compilation-error-fix.patch      | 41
> > > ++++++++++++++++++++++
> > >  .../bluez/bluez4_4.101.bbappend                    |  1 +
> > >  2 files changed, 42 insertions(+)
> > >  create mode 100644
> > >
> > meta-arago-distro/recipes-connectivity/bluez/bluez4/0001-strict-C-compilation-error-fix.patch
> > >
> > > diff --git
> > >
> > a/meta-arago-distro/recipes-connectivity/bluez/bluez4/0001-strict-C-compilation-error-fix.patch
> > >
> > b/meta-arago-distro/recipes-connectivity/bluez/bluez4/0001-strict-C-compilation-error-fix.patch
> > > new file mode 100644
> > > index 0000000..c2cac24
> > > --- /dev/null
> > > +++
> > >
> > b/meta-arago-distro/recipes-connectivity/bluez/bluez4/0001-strict-C-compilation-error-fix.patch
> > > @@ -0,0 +1,41 @@
> > > +From d7fab1e161c2344875b1b0a2363f1f62efdd6cd4 Mon Sep 17 00:00:00 2001
> > > +From: Ankur Tyagi <ankur.tyagi@gallagher.com>
> > > +Date: Thu, 14 Jan 2016 18:12:23 +1300
> > > +Subject: [PATCH 1/1] strict C compilation error fix
> > > +
> > > +Signed-off-by: Ankur Tyagi <ankur.tyagi@gallagher.com>
> > > +---
> > > + lib/bluetooth.h | 10 +++++-----
> > > + 1 file changed, 5 insertions(+), 5 deletions(-)
> > > +
> > > +diff --git a/lib/bluetooth.h b/lib/bluetooth.h
> > > +index 0fc4508..449431d 100644
> > > +--- a/lib/bluetooth.h
> > > ++++ b/lib/bluetooth.h
> > > +@@ -138,18 +138,18 @@ enum {
> > > +
> > > + /* Bluetooth unaligned access */
> > > + #define bt_get_unaligned(ptr)            \
> > > +-({                        \
> > > ++__extension__ ({                \
> > > +    struct __attribute__((packed)) {    \
> > > +-        typeof(*(ptr)) __v;        \
> > > +-    } *__p = (typeof(__p)) (ptr);        \
> > > ++        __typeof__(*(ptr)) __v;        \
> > > ++    } *__p = (__typeof__(__p)) (ptr);    \
> > > +    __p->__v;                \
> > > + })
> > > +
> > > + #define bt_put_unaligned(val, ptr)        \
> > > + do {                        \
> > > +    struct __attribute__((packed)) {    \
> > > +-        typeof(*(ptr)) __v;        \
> > > +-    } *__p = (typeof(__p)) (ptr);        \
> > > ++        __typeof__(*(ptr)) __v;        \
> > > ++    } *__p = (__typeof__(__p)) (ptr);    \
> > > +    __p->__v = (val);            \
> > > + } while(0)
> > > +
> > > +--
> > > +1.9.1
> > > +
> > > diff --git
> > > a/meta-arago-distro/recipes-connectivity/bluez/bluez4_4.101.bbappend
> > > b/meta-arago-distro/recipes-connectivity/bluez/bluez4_4.101.bbappend
> > > index d111425..acda4ee 100644
> > > --- a/meta-arago-distro/recipes-connectivity/bluez/bluez4_4.101.bbappend
> > > +++ b/meta-arago-distro/recipes-connectivity/bluez/bluez4_4.101.bbappend
> > > @@ -5,6 +5,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
> > >  SRC_URI +=
> > > "file://bluez4-fix-synchronization-between-bluetoothd-and-dr.patch \
> > >              file://0001-socket-enable-for-bluez-4_98.patch \
> > >              file://0001-bluez-enable-source-interface.patch \
> > > +            file://0001-strict-C-compilation-error-fix.patch \
> > >  "
> > >  # udev 150-170 provide its on hid2hci tool and udev rules for it.
> > > Therefore,
> > >  # disabling hid2hci from bluez4.
> > > --
> >
> > > _______________________________________________
> > > meta-arago mailing list
> > > meta-arago@arago-project.org
> > > http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
> >
> >


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] Fix bluetooth.h compilation error with strict C
@ 2016-02-09  1:06 Ankur Tyagi
  0 siblings, 0 replies; 7+ messages in thread
From: Ankur Tyagi @ 2016-02-09  1:06 UTC (permalink / raw)
  To: meta-arago

[-- Attachment #1: Type: text/plain, Size: 2799 bytes --]

Please discard the previous patch.

This patch fixes the compilation error of bluetooth.h on fido branch

regards
Ankur

Signed-off-by: Ankur Tyagi <ankur.tyagi@gallagher.com>
---
 .../0001-strict-C-compilation-error-fix.patch      | 42
++++++++++++++++++++++
 .../bluez/bluez4_4.101.bbappend                    |  1 +
 2 files changed, 43 insertions(+)
 create mode 100644
meta-arago-distro/recipes-connectivity/bluez/bluez4/0001-strict-C-compilation-error-fix.patch

diff --git
a/meta-arago-distro/recipes-connectivity/bluez/bluez4/0001-strict-C-compilation-error-fix.patch
b/meta-arago-distro/recipes-connectivity/bluez/bluez4/0001-strict-C-compilation-error-fix.patch
new file mode 100644
index 0000000..e8109a0
--- /dev/null
+++
b/meta-arago-distro/recipes-connectivity/bluez/bluez4/0001-strict-C-compilation-error-fix.patch
@@ -0,0 +1,42 @@
+From d7fab1e161c2344875b1b0a2363f1f62efdd6cd4 Mon Sep 17 00:00:00 2001
+From: Ankur Tyagi <ankur.tyagi@gallagher.com>
+Date: Thu, 14 Jan 2016 18:12:23 +1300
+Subject: [PATCH 1/1] strict C compilation error fix
+
+Signed-off-by: Ankur Tyagi <ankur.tyagi@gallagher.com>
+Upstream-Status: Backported
+---
+ lib/bluetooth.h | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/lib/bluetooth.h b/lib/bluetooth.h
+index 0fc4508..449431d 100644
+--- a/lib/bluetooth.h
++++ b/lib/bluetooth.h
+@@ -138,18 +138,18 @@ enum {
+
+ /* Bluetooth unaligned access */
+ #define bt_get_unaligned(ptr) \
+-({ \
++__extension__ ({ \
+ struct __attribute__((packed)) { \
+- typeof(*(ptr)) __v; \
+- } *__p = (typeof(__p)) (ptr); \
++ __typeof__(*(ptr)) __v; \
++ } *__p = (__typeof__(__p)) (ptr); \
+ __p->__v; \
+ })
+
+ #define bt_put_unaligned(val, ptr) \
+ do { \
+ struct __attribute__((packed)) { \
+- typeof(*(ptr)) __v; \
+- } *__p = (typeof(__p)) (ptr); \
++ __typeof__(*(ptr)) __v; \
++ } *__p = (__typeof__(__p)) (ptr); \
+ __p->__v = (val); \
+ } while(0)
+
+--
+1.9.1
+
diff --git
a/meta-arago-distro/recipes-connectivity/bluez/bluez4_4.101.bbappend
b/meta-arago-distro/recipes-connectivity/bluez/bluez4_4.101.bbappend
index d111425..acda4ee 100644
--- a/meta-arago-distro/recipes-connectivity/bluez/bluez4_4.101.bbappend
+++ b/meta-arago-distro/recipes-connectivity/bluez/bluez4_4.101.bbappend
@@ -5,6 +5,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 SRC_URI +=
"file://bluez4-fix-synchronization-between-bluetoothd-and-dr.patch \
             file://0001-socket-enable-for-bluez-4_98.patch \
             file://0001-bluez-enable-source-interface.patch \
+            file://0001-strict-C-compilation-error-fix.patch \
 "
 # udev 150-170 provide its on hid2hci tool and udev rules for it.
Therefore,
 # disabling hid2hci from bluez4.
--

[-- Attachment #2: Type: text/html, Size: 3524 bytes --]

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH] Fix bluetooth.h compilation error with strict C
@ 2016-02-09  0:16 Ankur Tyagi
  0 siblings, 0 replies; 7+ messages in thread
From: Ankur Tyagi @ 2016-02-09  0:16 UTC (permalink / raw)
  To: openembedded-devel

Hi,

This patch fixes bluetooth.h strict C compilation error when building
bluez4 in fido branch.

thanks
Ankur

Signed-off-by: Ankur Tyagi <ankur.tyagi@gallagher.com>
---
 .../strict-C-compilation-error-fix.patch           | 42
++++++++++++++++++++++
 meta/recipes-connectivity/bluez/bluez4_4.101.bb    |  1 +
 2 files changed, 43 insertions(+)
 create mode 100644
meta/recipes-connectivity/bluez/bluez4-4.101/strict-C-compilation-error-fix.patch

diff --git
a/meta/recipes-connectivity/bluez/bluez4-4.101/strict-C-compilation-error-fix.patch
b/meta/recipes-connectivity/bluez/bluez4-4.101/strict-C-compilation-error-fix.patch
new file mode 100644
index 0000000..e8109a0
--- /dev/null
+++
b/meta/recipes-connectivity/bluez/bluez4-4.101/strict-C-compilation-error-fix.patch
@@ -0,0 +1,42 @@
+From d7fab1e161c2344875b1b0a2363f1f62efdd6cd4 Mon Sep 17 00:00:00 2001
+From: Ankur Tyagi <ankur.tyagi@gallagher.com>
+Date: Thu, 14 Jan 2016 18:12:23 +1300
+Subject: [PATCH 1/1] strict C compilation error fix
+
+Signed-off-by: Ankur Tyagi <ankur.tyagi@gallagher.com>
+Upstream-Status: Backported
+---
+ lib/bluetooth.h | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/lib/bluetooth.h b/lib/bluetooth.h
+index 0fc4508..449431d 100644
+--- a/lib/bluetooth.h
++++ b/lib/bluetooth.h
+@@ -138,18 +138,18 @@ enum {
+
+ /* Bluetooth unaligned access */
+ #define bt_get_unaligned(ptr) \
+-({ \
++__extension__ ({ \
+ struct __attribute__((packed)) { \
+- typeof(*(ptr)) __v; \
+- } *__p = (typeof(__p)) (ptr); \
++ __typeof__(*(ptr)) __v; \
++ } *__p = (__typeof__(__p)) (ptr); \
+ __p->__v; \
+ })
+
+ #define bt_put_unaligned(val, ptr) \
+ do { \
+ struct __attribute__((packed)) { \
+- typeof(*(ptr)) __v; \
+- } *__p = (typeof(__p)) (ptr); \
++ __typeof__(*(ptr)) __v; \
++ } *__p = (__typeof__(__p)) (ptr); \
+ __p->__v = (val); \
+ } while(0)
+
+--
+1.9.1
+
diff --git a/meta/recipes-connectivity/bluez/bluez4_4.101.bb
b/meta/recipes-connectivity/bluez/bluez4_4.101.bb
index ccd230d..7944141 100644
--- a/meta/recipes-connectivity/bluez/bluez4_4.101.bb
+++ b/meta/recipes-connectivity/bluez/bluez4_4.101.bb
@@ -9,6 +9,7 @@ SRC_URI += "file://bluetooth.conf \
             file://network-fix-network-Connect-method-parameters.patch \
             file://install-test-script.patch \

 file://use-legacy-pygobject-instead-ofgobject-introspection.patch \
+            file://strict-C-compilation-error-fix.patch
 "

 SRC_URI[md5sum] = "fb42cb7038c380eb0e2fa208987c96ad"
--


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH] Fix bluetooth.h compilation error with strict C
@ 2016-02-08 22:26 Ankur Tyagi
  0 siblings, 0 replies; 7+ messages in thread
From: Ankur Tyagi @ 2016-02-08 22:26 UTC (permalink / raw)
  To: meta-arago

[-- Attachment #1: Type: text/plain, Size: 2979 bytes --]

This patch fixes the compilation error of bluetooth.h on fido branch

regards
Ankur

Signed-off-by: Ankur Tyagi <ankur.tyagi@gallagher.com>
​Upstream-Status: Backported​

---
 .../0001-strict-C-compilation-error-fix.patch      | 41
++++++++++++++++++++++
 .../bluez/bluez4_4.101.bbappend                    |  1 +
 2 files changed, 42 insertions(+)
 create mode 100644
meta-arago-distro/recipes-connectivity/bluez/bluez4/0001-strict-C-compilation-error-fix.patch

diff --git
a/meta-arago-distro/recipes-connectivity/bluez/bluez4/0001-strict-C-compilation-error-fix.patch
b/meta-arago-distro/recipes-connectivity/bluez/bluez4/0001-strict-C-compilation-error-fix.patch
new file mode 100644
index 0000000..c2cac24
--- /dev/null
+++
b/meta-arago-distro/recipes-connectivity/bluez/bluez4/0001-strict-C-compilation-error-fix.patch
@@ -0,0 +1,41 @@
+From d7fab1e161c2344875b1b0a2363f1f62efdd6cd4 Mon Sep 17 00:00:00 2001
+From: Ankur Tyagi <ankur.tyagi@gallagher.com>
+Date: Thu, 14 Jan 2016 18:12:23 +1300
+Subject: [PATCH 1/1] strict C compilation error fix
+
+Signed-off-by: Ankur Tyagi <ankur.tyagi@gallagher.com>
+---
+ lib/bluetooth.h | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/lib/bluetooth.h b/lib/bluetooth.h
+index 0fc4508..449431d 100644
+--- a/lib/bluetooth.h
++++ b/lib/bluetooth.h
+@@ -138,18 +138,18 @@ enum {
+
+ /* Bluetooth unaligned access */
+ #define bt_get_unaligned(ptr)            \
+-({                        \
++__extension__ ({                \
+    struct __attribute__((packed)) {    \
+-        typeof(*(ptr)) __v;        \
+-    } *__p = (typeof(__p)) (ptr);        \
++        __typeof__(*(ptr)) __v;        \
++    } *__p = (__typeof__(__p)) (ptr);    \
+    __p->__v;                \
+ })
+
+ #define bt_put_unaligned(val, ptr)        \
+ do {                        \
+    struct __attribute__((packed)) {    \
+-        typeof(*(ptr)) __v;        \
+-    } *__p = (typeof(__p)) (ptr);        \
++        __typeof__(*(ptr)) __v;        \
++    } *__p = (__typeof__(__p)) (ptr);    \
+    __p->__v = (val);            \
+ } while(0)
+
+--
+1.9.1
+
diff --git
a/meta-arago-distro/recipes-connectivity/bluez/bluez4_4.101.bbappend
b/meta-arago-distro/recipes-connectivity/bluez/bluez4_4.101.bbappend
index d111425..acda4ee 100644
--- a/meta-arago-distro/recipes-connectivity/bluez/bluez4_4.101.bbappend
+++ b/meta-arago-distro/recipes-connectivity/bluez/bluez4_4.101.bbappend
@@ -5,6 +5,7 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 SRC_URI +=
"file://bluez4-fix-synchronization-between-bluetoothd-and-dr.patch \
             file://0001-socket-enable-for-bluez-4_98.patch \
             file://0001-bluez-enable-source-interface.patch \
+            file://0001-strict-C-compilation-error-fix.patch \
 "
 # udev 150-170 provide its on hid2hci tool and udev rules for it.
Therefore,
 # disabling hid2hci from bluez4.
--

[-- Attachment #2: Type: text/html, Size: 3972 bytes --]

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-02-09  1:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-29 20:30 [PATCH] Fix bluetooth.h compilation error with strict C Ankur Tyagi
2016-02-01 22:03 ` Denys Dmytriyenko
2016-02-01 22:38   ` Ankur Tyagi
2016-02-08 17:49     ` Denys Dmytriyenko
2016-02-08 22:26 Ankur Tyagi
2016-02-09  0:16 Ankur Tyagi
2016-02-09  1:06 Ankur Tyagi

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.