All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/12] xz: Correctly specify GPL-3.0 with autoconf exception
  2015-09-14 16:31 [PATCH 00/12] Fixes with clang Khem Raj
@ 2015-09-14 16:31 ` Khem Raj
  2015-09-14 16:31 ` [PATCH 02/12] hostap-utils: Use C99 stddefs in defining local typedefs Khem Raj
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 18+ messages in thread
From: Khem Raj @ 2015-09-14 16:31 UTC (permalink / raw
  To: openembedded-core

There is m4/ax_pthread.m4 macro which uses GPL-3.0 with autoconf
exception, there is no other occurance of GPL-3.0 use, lets mark the
licence correctly.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-extended/xz/xz_5.2.1.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-extended/xz/xz_5.2.1.bb b/meta/recipes-extended/xz/xz_5.2.1.bb
index e0ae48f..cf7fba6 100644
--- a/meta/recipes-extended/xz/xz_5.2.1.bb
+++ b/meta/recipes-extended/xz/xz_5.2.1.bb
@@ -6,7 +6,7 @@ SECTION = "base"
 # which is GPLv3 is an m4 macro which isn't shipped in any of our packages,
 # and the LGPL bits are under lib/, which appears to be used for libgnu, which
 # appears to be used for DOS builds. So we're left with GPLv2+ and PD.
-LICENSE = "GPLv2+ & GPLv3+ & LGPLv2.1+ & PD"
+LICENSE = "GPLv2+ & GPL-3.0-with-autoconf-exception & LGPLv2.1+ & PD"
 LICENSE_${PN} = "GPLv2+"
 LICENSE_${PN}-dev = "GPLv2+"
 LICENSE_${PN}-staticdev = "GPLv2+"
-- 
2.5.2



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

* [PATCH 02/12] hostap-utils: Use C99 stddefs in defining local typedefs
  2015-09-14 16:31 [PATCH 00/12] Fixes with clang Khem Raj
  2015-09-14 16:31 ` [PATCH 01/12] xz: Correctly specify GPL-3.0 with autoconf exception Khem Raj
@ 2015-09-14 16:31 ` Khem Raj
  2015-09-15  6:33   ` Mikko.Rapeli
  2015-09-14 16:31 ` [PATCH 03/12] xorg-driver: Fix logical && with bitwise and operation Khem Raj
                   ` (9 subsequent siblings)
  11 siblings, 1 reply; 18+ messages in thread
From: Khem Raj @ 2015-09-14 16:31 UTC (permalink / raw
  To: openembedded-core

The code is creating more abstract types which is nice however it should
be using standard defines from stdint.h and not random defines to base
its own type system

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...-__s32-__u16-__s16-__u8-in-terms-of-c99-t.patch | 36 ++++++++++++++++++++++
 meta/recipes-bsp/hostap/hostap-utils.inc           |  4 ++-
 2 files changed, 39 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-bsp/hostap/hostap-utils-0.4.7/0001-Define-_u32-__s32-__u16-__s16-__u8-in-terms-of-c99-t.patch

diff --git a/meta/recipes-bsp/hostap/hostap-utils-0.4.7/0001-Define-_u32-__s32-__u16-__s16-__u8-in-terms-of-c99-t.patch b/meta/recipes-bsp/hostap/hostap-utils-0.4.7/0001-Define-_u32-__s32-__u16-__s16-__u8-in-terms-of-c99-t.patch
new file mode 100644
index 0000000..b44dca3
--- /dev/null
+++ b/meta/recipes-bsp/hostap/hostap-utils-0.4.7/0001-Define-_u32-__s32-__u16-__s16-__u8-in-terms-of-c99-t.patch
@@ -0,0 +1,36 @@
+From 742fb110d9841a04b3ced256b0bf80ff304dcaff Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 31 Aug 2015 05:45:08 +0000
+Subject: [PATCH] Define _u32/__s32/__u16/__s16/__u8 in terms of c99 types
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ wireless_copy.h | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/wireless_copy.h b/wireless_copy.h
+index 8208258..1171a35 100644
+--- a/wireless_copy.h
++++ b/wireless_copy.h
+@@ -86,11 +86,11 @@
+ #else
+ #include <sys/types.h>
+ #include <net/if.h>
+-typedef __uint32_t __u32;
+-typedef __int32_t __s32;
+-typedef __uint16_t __u16;
+-typedef __int16_t __s16;
+-typedef __uint8_t __u8;
++typedef u_int32_t __u32;
++typedef int32_t __s32;
++typedef u_int16_t __u16;
++typedef int16_t __s16;
++typedef u_int8_t __u8;
+ #ifndef __user
+ #define __user
+ #endif /* __user */
+-- 
+2.5.1
+
diff --git a/meta/recipes-bsp/hostap/hostap-utils.inc b/meta/recipes-bsp/hostap/hostap-utils.inc
index 89d977a..140321d 100644
--- a/meta/recipes-bsp/hostap/hostap-utils.inc
+++ b/meta/recipes-bsp/hostap/hostap-utils.inc
@@ -10,7 +10,9 @@ SECTION = "kernel/userland"
 PR = "r4"
 
 SRC_URI = "http://hostap.epitest.fi/releases/hostap-utils-${PV}.tar.gz \
-	   file://hostap-fw-load.patch"
+           file://hostap-fw-load.patch \
+           file://0001-Define-_u32-__s32-__u16-__s16-__u8-in-terms-of-c99-t.patch \
+"
 S = "${WORKDIR}/hostap-utils-${PV}"
 
 BINARIES = "hostap_crypt_conf hostap_diag hostap_fw_load hostap_io_debug \
-- 
2.5.2



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

* [PATCH 00/12] Fixes with clang
@ 2015-09-14 16:31 Khem Raj
  2015-09-14 16:31 ` [PATCH 01/12] xz: Correctly specify GPL-3.0 with autoconf exception Khem Raj
                   ` (11 more replies)
  0 siblings, 12 replies; 18+ messages in thread
From: Khem Raj @ 2015-09-14 16:31 UTC (permalink / raw
  To: openembedded-core

These fixes generic in nature helps improve the portability of patches and make them work
on non GNU toolchain components

The following changes since commit 2c8c3d9c4b65d2a5c7976d530138ebcaac2b1447:

  gcc: reformat 0063-nativesdk-gcc-support.patch (2015-09-12 23:01:31 +0100)

are available in the git repository at:

  git://github.com/kraj/openembedded-core kraj/misc-fixes
  https://github.com//tree/kraj/misc-fixes

Khem Raj (12):
  xz: Correctly specify GPL-3.0 with autoconf exception
  hostap-utils: Use C99 stddefs in defining local typedefs
  xorg-driver: Fix logical && with bitwise and operation
  qt4: Fix kmap2qmap build with clang
  gummiboot: Fix build warnings seen with gcc5
  gnu-efi, syslinux: Support gcc < 4.7
  syslinux: Dont bypass gcc driver for dependency generation options
  opkg: Include stdio.h for FILE definition
  quota: Replace using -I= with STAGING_INCDIR
  connman: Fix build with musl
  waffle: upgrade waffle_1.5.1.bb -> waffle_1.5.2.bb
  sysstat: Include needed headers explicitly

 .../gnu-efi/gnu-efi/gcc46-compatibility.patch      | 21 ++++++
 meta/recipes-bsp/gnu-efi/gnu-efi_3.0.3.bb          |  1 +
 ...-C-syntax-errors-for-function-declaration.patch | 74 +++++++++++++++++++
 meta/recipes-bsp/gummiboot/gummiboot_git.bb        |  3 +
 ...-__s32-__u16-__s16-__u8-in-terms-of-c99-t.patch | 36 +++++++++
 meta/recipes-bsp/hostap/hostap-utils.inc           |  4 +-
 meta/recipes-connectivity/connman/connman.inc      |  1 +
 ...acktrace-API-availability-before-using-it.patch | 55 ++++++++++++++
 ...resolve-musl-does-not-implement-res_ninit.patch | 77 ++++++++++++++++++++
 .../0003-Fix-header-inclusions-for-musl.patch      | 85 ++++++++++++++++++++++
 meta/recipes-connectivity/connman/connman_1.30.bb  |  3 +
 ...-include-stdio.h-for-getting-FILE-defined.patch | 45 ++++++++++++
 meta/recipes-devtools/opkg/opkg_0.3.0.bb           |  1 +
 .../syslinux/0010-gcc46-compatibility.patch        | 37 ++++++++++
 .../0011-mk-MMD-does-not-take-any-arguments.patch  | 33 +++++++++
 meta/recipes-devtools/syslinux/syslinux_6.03.bb    |  2 +
 .../quota/quota/remove_non_posix_types.patch       | 13 ++++
 meta/recipes-extended/quota/quota_4.02.bb          |  2 +-
 .../0001-Include-needed-headers-explicitly.patch   | 62 ++++++++++++++++
 meta/recipes-extended/sysstat/sysstat_11.1.5.bb    |  2 +
 meta/recipes-extended/xz/xz_5.2.1.bb               |  2 +-
 ...-threads-Use-PTHREAD_MUTEX_RECURSIVE-by-d.patch | 54 ++++++++++++++
 .../waffle/{waffle_1.5.1.bb => waffle_1.5.2.bb}    |  8 +-
 ...put_dpms-Replace-logical-with-bitwise-ope.patch | 31 ++++++++
 .../xorg-driver/xf86-video-omap_0.4.3.bb           |  2 +
 meta/recipes-qt/qt4/qt4-4.8.7.inc                  |  1 +
 .../0034-Fix-kmap2qmap-build-with-clang.patch      | 34 +++++++++
 27 files changed, 683 insertions(+), 6 deletions(-)
 create mode 100644 meta/recipes-bsp/gnu-efi/gnu-efi/gcc46-compatibility.patch
 create mode 100644 meta/recipes-bsp/gummiboot/gummiboot/0001-console-Fix-C-syntax-errors-for-function-declaration.patch
 create mode 100644 meta/recipes-bsp/hostap/hostap-utils-0.4.7/0001-Define-_u32-__s32-__u16-__s16-__u8-in-terms-of-c99-t.patch
 create mode 100644 meta/recipes-connectivity/connman/connman/0001-Detect-backtrace-API-availability-before-using-it.patch
 create mode 100644 meta/recipes-connectivity/connman/connman/0002-resolve-musl-does-not-implement-res_ninit.patch
 create mode 100644 meta/recipes-connectivity/connman/connman/0003-Fix-header-inclusions-for-musl.patch
 create mode 100644 meta/recipes-devtools/opkg/opkg/0001-libopkg-include-stdio.h-for-getting-FILE-defined.patch
 create mode 100644 meta/recipes-devtools/syslinux/syslinux/0010-gcc46-compatibility.patch
 create mode 100644 meta/recipes-devtools/syslinux/syslinux/0011-mk-MMD-does-not-take-any-arguments.patch
 create mode 100644 meta/recipes-extended/sysstat/sysstat/0001-Include-needed-headers-explicitly.patch
 create mode 100644 meta/recipes-graphics/waffle/waffle/0001-third_party-threads-Use-PTHREAD_MUTEX_RECURSIVE-by-d.patch
 rename meta/recipes-graphics/waffle/{waffle_1.5.1.bb => waffle_1.5.2.bb} (84%)
 create mode 100644 meta/recipes-graphics/xorg-driver/xf86-video-omap/0001-drmmode_output_dpms-Replace-logical-with-bitwise-ope.patch
 create mode 100644 meta/recipes-qt/qt4/qt4-4.8.7/0034-Fix-kmap2qmap-build-with-clang.patch

-- 
2.5.2



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

* [PATCH 03/12] xorg-driver: Fix logical && with bitwise and operation
  2015-09-14 16:31 [PATCH 00/12] Fixes with clang Khem Raj
  2015-09-14 16:31 ` [PATCH 01/12] xz: Correctly specify GPL-3.0 with autoconf exception Khem Raj
  2015-09-14 16:31 ` [PATCH 02/12] hostap-utils: Use C99 stddefs in defining local typedefs Khem Raj
@ 2015-09-14 16:31 ` Khem Raj
  2015-09-14 16:31 ` [PATCH 04/12] qt4: Fix kmap2qmap build with clang Khem Raj
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 18+ messages in thread
From: Khem Raj @ 2015-09-14 16:31 UTC (permalink / raw
  To: openembedded-core

This must have been a typo which is a bug infact we should have used
bitwise & in first place.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...put_dpms-Replace-logical-with-bitwise-ope.patch | 31 ++++++++++++++++++++++
 .../xorg-driver/xf86-video-omap_0.4.3.bb           |  2 ++
 2 files changed, 33 insertions(+)
 create mode 100644 meta/recipes-graphics/xorg-driver/xf86-video-omap/0001-drmmode_output_dpms-Replace-logical-with-bitwise-ope.patch

diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-omap/0001-drmmode_output_dpms-Replace-logical-with-bitwise-ope.patch b/meta/recipes-graphics/xorg-driver/xf86-video-omap/0001-drmmode_output_dpms-Replace-logical-with-bitwise-ope.patch
new file mode 100644
index 0000000..41e77d3
--- /dev/null
+++ b/meta/recipes-graphics/xorg-driver/xf86-video-omap/0001-drmmode_output_dpms-Replace-logical-with-bitwise-ope.patch
@@ -0,0 +1,31 @@
+From fc653ca3b36435aea281ae409fb90f85e1bc0d81 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 7 Sep 2015 08:44:13 +0000
+Subject: [freedreno][PATCH] drmmode_output_dpms: Replace logical && with bitwise &
+ operation
+
+This is a mask calculation so bitbwise & should have been used
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ src/drmmode_display.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/drmmode_display.c b/src/drmmode_display.c
+index c3cf4f8..eb54b59 100644
+--- a/src/drmmode_display.c
++++ b/src/drmmode_display.c
+@@ -777,7 +777,7 @@ drmmode_output_dpms(xf86OutputPtr output, int mode)
+ 
+ 	for (i = 0; i < koutput->count_props; i++) {
+ 		props = drmModeGetProperty(drmmode->fd, koutput->props[i]);
+-		if (props && (props->flags && DRM_MODE_PROP_ENUM)) {
++		if (props && (props->flags & DRM_MODE_PROP_ENUM)) {
+ 			if (!strcmp(props->name, "DPMS")) {
+ 				mode_id = koutput->props[i];
+ 				drmModeFreeProperty(props);
+-- 
+2.5.1
+
diff --git a/meta/recipes-graphics/xorg-driver/xf86-video-omap_0.4.3.bb b/meta/recipes-graphics/xorg-driver/xf86-video-omap_0.4.3.bb
index 5f3a532..76682ed 100644
--- a/meta/recipes-graphics/xorg-driver/xf86-video-omap_0.4.3.bb
+++ b/meta/recipes-graphics/xorg-driver/xf86-video-omap_0.4.3.bb
@@ -24,6 +24,8 @@ LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=10ce5de3b111315ea652a5f74ec0c602"
 DEPENDS += "virtual/libx11 libdrm xf86driproto"
 
+SRC_URI += "file://0001-drmmode_output_dpms-Replace-logical-with-bitwise-ope.patch"
+
 SRC_URI[md5sum] = "be35daf6fa4b75092cc4a8978c437bc5"
 SRC_URI[sha256sum] = "db1e0e69fd4c4c8fdca5ef2cb0447bccd7518a718495876a6904bef57b39986d"
 
-- 
2.5.2



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

* [PATCH 04/12] qt4: Fix kmap2qmap build with clang
  2015-09-14 16:31 [PATCH 00/12] Fixes with clang Khem Raj
                   ` (2 preceding siblings ...)
  2015-09-14 16:31 ` [PATCH 03/12] xorg-driver: Fix logical && with bitwise and operation Khem Raj
@ 2015-09-14 16:31 ` Khem Raj
  2015-09-14 16:31 ` [PATCH 05/12] gummiboot: Fix build warnings seen with gcc5 Khem Raj
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 18+ messages in thread
From: Khem Raj @ 2015-09-14 16:31 UTC (permalink / raw
  To: openembedded-core

Adapted and backported https://codereview.qt-project.org/#/c/107464/

Fixes errors like
../../include/QtCore/../../src/corelib/tools/qalgorithms.h:161:20:
error: call to function 'operator<' that is neither visible in the
template definition nor found by argument-dependent lookup
        return (t1 < t2);

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-qt/qt4/qt4-4.8.7.inc                  |  1 +
 .../0034-Fix-kmap2qmap-build-with-clang.patch      | 34 ++++++++++++++++++++++
 2 files changed, 35 insertions(+)
 create mode 100644 meta/recipes-qt/qt4/qt4-4.8.7/0034-Fix-kmap2qmap-build-with-clang.patch

diff --git a/meta/recipes-qt/qt4/qt4-4.8.7.inc b/meta/recipes-qt/qt4/qt4-4.8.7.inc
index 5257e76..d38637c 100644
--- a/meta/recipes-qt/qt4/qt4-4.8.7.inc
+++ b/meta/recipes-qt/qt4/qt4-4.8.7.inc
@@ -25,6 +25,7 @@ SRC_URI = "http://download.qt-project.org/official_releases/qt/4.8/${PV}/qt-ever
            file://0030-aarch64_arm64_qatomic_support.patch \
            file://0031-aarch64_arm64_mkspecs.patch \
            file://0032-aarch64_add_header.patch \
+           file://0034-Fix-kmap2qmap-build-with-clang.patch \
            file://Fix-QWSLock-invalid-argument-logs.patch \
            file://add_check_for_aarch64_32.patch \
            file://g++.conf \
diff --git a/meta/recipes-qt/qt4/qt4-4.8.7/0034-Fix-kmap2qmap-build-with-clang.patch b/meta/recipes-qt/qt4/qt4-4.8.7/0034-Fix-kmap2qmap-build-with-clang.patch
new file mode 100644
index 0000000..f47a1d9
--- /dev/null
+++ b/meta/recipes-qt/qt4/qt4-4.8.7/0034-Fix-kmap2qmap-build-with-clang.patch
@@ -0,0 +1,34 @@
+From: Samuel Gaist <samuel.gaist@edeltech.ch>
+Date: Wed, 4 Mar 2015 20:16:50 +0000 (+0100)
+Subject: Fix kmap2qmap build on OS X
+X-Git-Tag: v5.4.2~6
+X-Git-Url: https://codereview.qt-project.org/gitweb?p=qt%2Fqttools.git;a=commitdiff_plain;h=cf196a2565235f649b88fac55b53270bea23458d;hp=3070815a24239bd0f469bfeb8d0a1f091974e28e
+
+Fix kmap2qmap build on OS X
+
+Currently kmap2qmap fails to build on OS X (clang) This patch aims to
+fix this.
+
+Change-Id: I61c985dc7ad1f2486368c39aa976599d274942ab
+Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
+---
+Upstream-Status: Backport
+Index: qt-everywhere-opensource-src-4.8.7/tools/kmap2qmap/main.cpp
+===================================================================
+--- qt-everywhere-opensource-src-4.8.7.orig/tools/kmap2qmap/main.cpp
++++ qt-everywhere-opensource-src-4.8.7/tools/kmap2qmap/main.cpp
+@@ -385,9 +385,11 @@ static const int symbol_synonyms_size =
+ 
+ // makes the generated array in --header mode a bit more human readable
+ QT_BEGIN_NAMESPACE
+-static bool operator<(const QWSKeyboard::Mapping &m1, const QWSKeyboard::Mapping &m2)
+-{
+-    return m1.keycode != m2.keycode ? m1.keycode < m2.keycode : m1.modifiers < m2.modifiers;
++namespace QWSKeyboard {
++    static bool operator<(const Mapping &m1, const Mapping &m2)
++    {
++        return m1.keycode != m2.keycode ? m1.keycode < m2.keycode : m1.modifiers < m2.modifiers;
++    }
+ }
+ QT_END_NAMESPACE
+ 
-- 
2.5.2



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

* [PATCH 05/12] gummiboot: Fix build warnings seen with gcc5
  2015-09-14 16:31 [PATCH 00/12] Fixes with clang Khem Raj
                   ` (3 preceding siblings ...)
  2015-09-14 16:31 ` [PATCH 04/12] qt4: Fix kmap2qmap build with clang Khem Raj
@ 2015-09-14 16:31 ` Khem Raj
  2015-09-14 16:31 ` [PATCH 06/12] gnu-efi, syslinux: Support gcc < 4.7 Khem Raj
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 18+ messages in thread
From: Khem Raj @ 2015-09-14 16:31 UTC (permalink / raw
  To: openembedded-core

gummiboot uses -mno-sse so we should disble using sse for mfpmath as
well

Fix syntax errors in struct defines

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...-C-syntax-errors-for-function-declaration.patch | 74 ++++++++++++++++++++++
 meta/recipes-bsp/gummiboot/gummiboot_git.bb        |  3 +
 2 files changed, 77 insertions(+)
 create mode 100644 meta/recipes-bsp/gummiboot/gummiboot/0001-console-Fix-C-syntax-errors-for-function-declaration.patch

diff --git a/meta/recipes-bsp/gummiboot/gummiboot/0001-console-Fix-C-syntax-errors-for-function-declaration.patch b/meta/recipes-bsp/gummiboot/gummiboot/0001-console-Fix-C-syntax-errors-for-function-declaration.patch
new file mode 100644
index 0000000..fa50bc4
--- /dev/null
+++ b/meta/recipes-bsp/gummiboot/gummiboot/0001-console-Fix-C-syntax-errors-for-function-declaration.patch
@@ -0,0 +1,74 @@
+From 55957faf1272c8f5f304909faeebf647a78e3701 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 9 Sep 2015 07:19:45 +0000
+Subject: [PATCH] console: Fix C syntax errors for function declaration
+
+To address this, the semicolons after the function parameters should be
+replaced by commas, and the last one should be omitted
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ src/efi/console.c | 26 +++++++++++++-------------
+ 1 file changed, 13 insertions(+), 13 deletions(-)
+
+diff --git a/src/efi/console.c b/src/efi/console.c
+index 6206c80..66aa88f 100644
+--- a/src/efi/console.c
++++ b/src/efi/console.c
+@@ -27,8 +27,8 @@
+ struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL;
+ 
+ typedef EFI_STATUS (EFIAPI *EFI_INPUT_RESET_EX)(
+-        struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This;
+-        BOOLEAN ExtendedVerification;
++        struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
++        BOOLEAN ExtendedVerification
+ );
+ 
+ typedef UINT8 EFI_KEY_TOGGLE_STATE;
+@@ -44,29 +44,29 @@ typedef struct {
+ } EFI_KEY_DATA;
+ 
+ typedef EFI_STATUS (EFIAPI *EFI_INPUT_READ_KEY_EX)(
+-        struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This;
+-        EFI_KEY_DATA *KeyData;
++        struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
++        EFI_KEY_DATA *KeyData
+ );
+ 
+ typedef EFI_STATUS (EFIAPI *EFI_SET_STATE)(
+-        struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This;
+-        EFI_KEY_TOGGLE_STATE *KeyToggleState;
++        struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
++        EFI_KEY_TOGGLE_STATE *KeyToggleState
+ );
+ 
+ typedef EFI_STATUS (EFIAPI *EFI_KEY_NOTIFY_FUNCTION)(
+-        EFI_KEY_DATA *KeyData;
++        EFI_KEY_DATA *KeyData
+ );
+ 
+ typedef EFI_STATUS (EFIAPI *EFI_REGISTER_KEYSTROKE_NOTIFY)(
+-        struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This;
+-        EFI_KEY_DATA KeyData;
+-        EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction;
+-        VOID **NotifyHandle;
++        struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
++        EFI_KEY_DATA KeyData,
++        EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
++        VOID **NotifyHandle
+ );
+ 
+ typedef EFI_STATUS (EFIAPI *EFI_UNREGISTER_KEYSTROKE_NOTIFY)(
+-        struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This;
+-        VOID *NotificationHandle;
++        struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
++        VOID *NotificationHandle
+ );
+ 
+ typedef struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL {
+-- 
+2.5.1
+
diff --git a/meta/recipes-bsp/gummiboot/gummiboot_git.bb b/meta/recipes-bsp/gummiboot/gummiboot_git.bb
index 91c3db9..376ab54 100644
--- a/meta/recipes-bsp/gummiboot/gummiboot_git.bb
+++ b/meta/recipes-bsp/gummiboot/gummiboot_git.bb
@@ -13,6 +13,7 @@ PV = "48+git${SRCPV}"
 SRCREV = "2bcd919c681c952eb867ef1bdb458f1bc49c2d55"
 SRC_URI = "git://anongit.freedesktop.org/gummiboot \
            file://fix-objcopy.patch \
+           file://0001-console-Fix-C-syntax-errors-for-function-declaration.patch \
           "
 
 # Note: Add COMPATIBLE_HOST here is only because it depends on gnu-efi
@@ -28,6 +29,8 @@ EXTRA_OECONF = "--disable-manpages --with-efi-includedir=${STAGING_INCDIR} \
 
 EXTRA_OEMAKE += "gummibootlibdir=${libdir}/gummiboot"
 
+TUNE_CCARGS_remove = "-mfpmath=sse"
+
 do_deploy () {
         install ${B}/gummiboot*.efi ${DEPLOYDIR}
 }
-- 
2.5.2



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

* [PATCH 06/12] gnu-efi, syslinux: Support gcc < 4.7
  2015-09-14 16:31 [PATCH 00/12] Fixes with clang Khem Raj
                   ` (4 preceding siblings ...)
  2015-09-14 16:31 ` [PATCH 05/12] gummiboot: Fix build warnings seen with gcc5 Khem Raj
@ 2015-09-14 16:31 ` Khem Raj
  2015-09-14 16:31 ` [PATCH 07/12] syslinux: Dont bypass gcc driver for dependency generation options Khem Raj
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 18+ messages in thread
From: Khem Raj @ 2015-09-14 16:31 UTC (permalink / raw
  To: openembedded-core

This helps compiling the code with older gcc especially on older build
hosts, additionally clang advertizes itself as gcc 4.2.1 so it helps
compiling dependent modues using clang as well

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../gnu-efi/gnu-efi/gcc46-compatibility.patch      | 21 ++++++++++++
 meta/recipes-bsp/gnu-efi/gnu-efi_3.0.3.bb          |  1 +
 .../syslinux/0010-gcc46-compatibility.patch        | 37 ++++++++++++++++++++++
 meta/recipes-devtools/syslinux/syslinux_6.03.bb    |  1 +
 4 files changed, 60 insertions(+)
 create mode 100644 meta/recipes-bsp/gnu-efi/gnu-efi/gcc46-compatibility.patch
 create mode 100644 meta/recipes-devtools/syslinux/syslinux/0010-gcc46-compatibility.patch

diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi/gcc46-compatibility.patch b/meta/recipes-bsp/gnu-efi/gnu-efi/gcc46-compatibility.patch
new file mode 100644
index 0000000..0ce6d7b
--- /dev/null
+++ b/meta/recipes-bsp/gnu-efi/gnu-efi/gcc46-compatibility.patch
@@ -0,0 +1,21 @@
+don't break with old compilers and -DGNU_EFI_USE_MS_ABI
+It's entirely legitimate to request GNU_EFI_USE_MS_ABI even if the current
+compiler doesn't support it, and gnu-efi should transparently fall back to
+using legacy techniques to set the calling convention.  We don't get type
+checking, but at least it will still compile.
+
+Author: Steve Langasek <steve.langasek@ubuntu.com>
+Upstream-Status: Pending
+Index: gnu-efi-3.0.3/inc/x86_64/efibind.h
+===================================================================
+--- gnu-efi-3.0.3.orig/inc/x86_64/efibind.h
++++ gnu-efi-3.0.3/inc/x86_64/efibind.h
+@@ -25,8 +25,6 @@ Revision History
+ #if defined(GNU_EFI_USE_MS_ABI)
+     #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7))
+         #define HAVE_USE_MS_ABI 1
+-    #else
+-        #error Compiler is too old for GNU_EFI_USE_MS_ABI
+     #endif
+ #endif
+ 
diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.3.bb b/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.3.bb
index 1a1ba40..eca3459 100644
--- a/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.3.bb
+++ b/meta/recipes-bsp/gnu-efi/gnu-efi_3.0.3.bb
@@ -18,6 +18,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.bz2 \
            file://parallel-make-archives.patch \
            file://lib-Makefile-fix-parallel-issue.patch \
            file://gnu-efi-Make-setjmp.S-portable-to-ARM.patch \
+           file://gcc46-compatibility.patch \
           "
 
 SRC_URI[md5sum] = "15a4bcbc18a9a5e8110ed955970622e6"
diff --git a/meta/recipes-devtools/syslinux/syslinux/0010-gcc46-compatibility.patch b/meta/recipes-devtools/syslinux/syslinux/0010-gcc46-compatibility.patch
new file mode 100644
index 0000000..6279258
--- /dev/null
+++ b/meta/recipes-devtools/syslinux/syslinux/0010-gcc46-compatibility.patch
@@ -0,0 +1,37 @@
+don't break with old compilers and -DGNU_EFI_USE_MS_ABI
+It's entirely legitimate to request GNU_EFI_USE_MS_ABI even if the current
+compiler doesn't support it, and gnu-efi should transparently fall back to
+using legacy techniques to set the calling convention.  We don't get type
+checking, but at least it will still compile.
+
+Adapted from gnu-efi
+
+Author: Steve Langasek <steve.langasek@ubuntu.com>
+Upstream-Status: Pending
+
+Index: syslinux-6.03/efi64/include/efi/x86_64/efibind.h
+===================================================================
+--- syslinux-6.03.orig/efi64/include/efi/x86_64/efibind.h
++++ syslinux-6.03/efi64/include/efi/x86_64/efibind.h
+@@ -25,8 +25,6 @@ Revision History
+ #if defined(GNU_EFI_USE_MS_ABI)
+     #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7))
+         #define HAVE_USE_MS_ABI 1
+-    #else
+-        #error Compiler is too old for GNU_EFI_USE_MS_ABI
+     #endif
+ #endif
+ 
+Index: syslinux-6.03/gnu-efi/gnu-efi-3.0/inc/x86_64/efibind.h
+===================================================================
+--- syslinux-6.03.orig/gnu-efi/gnu-efi-3.0/inc/x86_64/efibind.h
++++ syslinux-6.03/gnu-efi/gnu-efi-3.0/inc/x86_64/efibind.h
+@@ -25,8 +25,6 @@ Revision History
+ #if defined(GNU_EFI_USE_MS_ABI)
+     #if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7))
+         #define HAVE_USE_MS_ABI 1
+-    #else
+-        #error Compiler is too old for GNU_EFI_USE_MS_ABI
+     #endif
+ #endif
+ 
diff --git a/meta/recipes-devtools/syslinux/syslinux_6.03.bb b/meta/recipes-devtools/syslinux/syslinux_6.03.bb
index ef9ae2f..94077da 100644
--- a/meta/recipes-devtools/syslinux/syslinux_6.03.bb
+++ b/meta/recipes-devtools/syslinux/syslinux_6.03.bb
@@ -21,6 +21,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/boot/syslinux/syslinux-${PV}.tar.xz \
            file://0007-linux-syslinux-implement-ext_construct_sectmap_fs.patch \
            file://0008-libinstaller-syslinuxext-implement-syslinux_patch_bo.patch \
            file://0009-linux-syslinux-implement-install_bootblock.patch \
+           file://0010-gcc46-compatibility.patch \
            "
 
 SRC_URI[md5sum] = "92a253df9211e9c20172796ecf388f13"
-- 
2.5.2



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

* [PATCH 07/12] syslinux: Dont bypass gcc driver for dependency generation options
  2015-09-14 16:31 [PATCH 00/12] Fixes with clang Khem Raj
                   ` (5 preceding siblings ...)
  2015-09-14 16:31 ` [PATCH 06/12] gnu-efi, syslinux: Support gcc < 4.7 Khem Raj
@ 2015-09-14 16:31 ` Khem Raj
  2015-09-14 16:31 ` [PATCH 08/12] opkg: Include stdio.h for FILE definition Khem Raj
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 18+ messages in thread
From: Khem Raj @ 2015-09-14 16:31 UTC (permalink / raw
  To: openembedded-core

GCC docs also do not recommend using -Wp instead pass the option via gcc
driver and let it process it as needed

This also helps in making it work with clang as well

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../0011-mk-MMD-does-not-take-any-arguments.patch  | 33 ++++++++++++++++++++++
 meta/recipes-devtools/syslinux/syslinux_6.03.bb    |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 meta/recipes-devtools/syslinux/syslinux/0011-mk-MMD-does-not-take-any-arguments.patch

diff --git a/meta/recipes-devtools/syslinux/syslinux/0011-mk-MMD-does-not-take-any-arguments.patch b/meta/recipes-devtools/syslinux/syslinux/0011-mk-MMD-does-not-take-any-arguments.patch
new file mode 100644
index 0000000..443c1cc
--- /dev/null
+++ b/meta/recipes-devtools/syslinux/syslinux/0011-mk-MMD-does-not-take-any-arguments.patch
@@ -0,0 +1,33 @@
+From 0f3d83c25491951f1fa84c7957358ef3d1bcd8a9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Wed, 9 Sep 2015 17:39:22 +0000
+Subject: [PATCH] mk: -MMD does not take any arguments
+
+Specify -Wp for each option, clang seems to not accept
+-Wp,-x,y,-a,b
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ mk/syslinux.mk | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+Index: syslinux-6.03/mk/syslinux.mk
+===================================================================
+--- syslinux-6.03.orig/mk/syslinux.mk
++++ syslinux-6.03/mk/syslinux.mk
+@@ -82,11 +82,11 @@ ARCH ?= $(strip $(SUBARCH))
+ GCCWARN  = -W -Wall -Wstrict-prototypes $(DEBUGOPT)
+ 
+ # Common stanza to make gcc generate .*.d dependency files
+-MAKEDEPS = -Wp,-MT,$@,-MD,$(dir $@).$(notdir $@).d
++MAKEDEPS = -MT $@ -MD
+ 
+ # Dependencies that exclude system headers; use whenever we use
+ # header files from the platform.
+-UMAKEDEPS = -Wp,-MT,$@,-MMD,$(dir $@).$(notdir $@).d
++UMAKEDEPS = -MT $@ -MMD
+ 
+ # Items that are only appropriate during development; this file is
+ # removed when tarballs are generated.
diff --git a/meta/recipes-devtools/syslinux/syslinux_6.03.bb b/meta/recipes-devtools/syslinux/syslinux_6.03.bb
index 94077da..8534528 100644
--- a/meta/recipes-devtools/syslinux/syslinux_6.03.bb
+++ b/meta/recipes-devtools/syslinux/syslinux_6.03.bb
@@ -22,6 +22,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/boot/syslinux/syslinux-${PV}.tar.xz \
            file://0008-libinstaller-syslinuxext-implement-syslinux_patch_bo.patch \
            file://0009-linux-syslinux-implement-install_bootblock.patch \
            file://0010-gcc46-compatibility.patch \
+           file://0011-mk-MMD-does-not-take-any-arguments.patch \
            "
 
 SRC_URI[md5sum] = "92a253df9211e9c20172796ecf388f13"
-- 
2.5.2



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

* [PATCH 08/12] opkg: Include stdio.h for FILE definition
  2015-09-14 16:31 [PATCH 00/12] Fixes with clang Khem Raj
                   ` (6 preceding siblings ...)
  2015-09-14 16:31 ` [PATCH 07/12] syslinux: Dont bypass gcc driver for dependency generation options Khem Raj
@ 2015-09-14 16:31 ` Khem Raj
  2015-09-14 16:31 ` [PATCH 09/12] quota: Replace using -I= with STAGING_INCDIR Khem Raj
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 18+ messages in thread
From: Khem Raj @ 2015-09-14 16:31 UTC (permalink / raw
  To: openembedded-core

Helps with compling it on musl

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...-include-stdio.h-for-getting-FILE-defined.patch | 45 ++++++++++++++++++++++
 meta/recipes-devtools/opkg/opkg_0.3.0.bb           |  1 +
 2 files changed, 46 insertions(+)
 create mode 100644 meta/recipes-devtools/opkg/opkg/0001-libopkg-include-stdio.h-for-getting-FILE-defined.patch

diff --git a/meta/recipes-devtools/opkg/opkg/0001-libopkg-include-stdio.h-for-getting-FILE-defined.patch b/meta/recipes-devtools/opkg/opkg/0001-libopkg-include-stdio.h-for-getting-FILE-defined.patch
new file mode 100644
index 0000000..acc1338
--- /dev/null
+++ b/meta/recipes-devtools/opkg/opkg/0001-libopkg-include-stdio.h-for-getting-FILE-defined.patch
@@ -0,0 +1,45 @@
+From 58f4d3d63cd6097154205ea7ee042005036659b3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 10 Sep 2015 21:43:32 -0700
+Subject: [PATCH] libopkg: include stdio.h for getting FILE defined
+To: opkg-devel@googlegroups.com
+Cc: paul@paulbarker.me.uk
+
+For some libc(musl) stdio.h may not get included indirectly which means
+we need to mention it in explicit include list
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ libopkg/opkg_verify.c | 1 +
+ libopkg/pkg_src.c     | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/libopkg/opkg_verify.c b/libopkg/opkg_verify.c
+index 41dc3f4..a71591d 100644
+--- a/libopkg/opkg_verify.c
++++ b/libopkg/opkg_verify.c
+@@ -18,6 +18,7 @@
+ 
+ #include <malloc.h>
+ #include <string.h>
++#include <stdio.h>
+ 
+ #include "file_util.h"
+ #include "opkg_conf.h"
+diff --git a/libopkg/pkg_src.c b/libopkg/pkg_src.c
+index e31ec21..6b49a00 100644
+--- a/libopkg/pkg_src.c
++++ b/libopkg/pkg_src.c
+@@ -20,6 +20,7 @@
+ 
+ #include <malloc.h>
+ #include <unistd.h>
++#include <stdio.h>
+ 
+ #include "file_util.h"
+ #include "opkg_conf.h"
+-- 
+2.5.1
+
diff --git a/meta/recipes-devtools/opkg/opkg_0.3.0.bb b/meta/recipes-devtools/opkg/opkg_0.3.0.bb
index f4dbb2d..884368f 100644
--- a/meta/recipes-devtools/opkg/opkg_0.3.0.bb
+++ b/meta/recipes-devtools/opkg/opkg_0.3.0.bb
@@ -15,6 +15,7 @@ SRC_URI = "http://downloads.yoctoproject.org/releases/${BPN}/${BPN}-${PV}.tar.gz
            file://opkg-configure.service \
            file://opkg.conf \
            file://0001-opkg_archive-add-support-for-empty-compressed-files.patch \
+           file://0001-libopkg-include-stdio.h-for-getting-FILE-defined.patch \
 "
 
 SRC_URI[md5sum] = "3412cdc71d78b98facc84b19331ec64e"
-- 
2.5.2



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

* [PATCH 09/12] quota: Replace using -I= with STAGING_INCDIR
  2015-09-14 16:31 [PATCH 00/12] Fixes with clang Khem Raj
                   ` (7 preceding siblings ...)
  2015-09-14 16:31 ` [PATCH 08/12] opkg: Include stdio.h for FILE definition Khem Raj
@ 2015-09-14 16:31 ` Khem Raj
  2015-09-14 16:31 ` [PATCH 10/12] connman: Fix build with musl Khem Raj
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 18+ messages in thread
From: Khem Raj @ 2015-09-14 16:31 UTC (permalink / raw
  To: openembedded-core

-I= is gcc specific, using STAGING_INCDIR makes it compiler independent
Update posix types patch to include new u_int -> uint32_t changes

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../quota/quota/remove_non_posix_types.patch                | 13 +++++++++++++
 meta/recipes-extended/quota/quota_4.02.bb                   |  2 +-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-extended/quota/quota/remove_non_posix_types.patch b/meta/recipes-extended/quota/quota/remove_non_posix_types.patch
index 5442d98..06ff13c 100644
--- a/meta/recipes-extended/quota/quota/remove_non_posix_types.patch
+++ b/meta/recipes-extended/quota/quota/remove_non_posix_types.patch
@@ -183,3 +183,16 @@ Index: quota-tools/quot.h
  } du_t;
  
  #define	NDU	60000
+Index: quota-tools/rquota_server.c
+===================================================================
+--- quota-tools.orig/rquota_server.c
++++ quota-tools/rquota_server.c
+@@ -60,7 +60,7 @@ extern char nfs_pseudoroot[PATH_MAX];
+  */
+ extern struct authunix_parms *unix_cred;
+ 
+-int in_group(gid_t * gids, u_int len, gid_t gid)
++int in_group(gid_t * gids, uint32_t len, gid_t gid)
+ {
+ 	gid_t *gidsp = gids + len;
+ 
diff --git a/meta/recipes-extended/quota/quota_4.02.bb b/meta/recipes-extended/quota/quota_4.02.bb
index 124b0a3..673d584 100644
--- a/meta/recipes-extended/quota/quota_4.02.bb
+++ b/meta/recipes-extended/quota/quota_4.02.bb
@@ -23,7 +23,7 @@ DEPENDS = "gettext-native e2fsprogs"
 
 inherit autotools-brokensep gettext pkgconfig
 
-CFLAGS += "-I=${includedir}/tirpc"
+CFLAGS += "-I${STAGING_INCDIR}/tirpc"
 LDFLAGS += "-ltirpc"
 ASNEEDED = ""
 EXTRA_OEMAKE += 'STRIP=""'
-- 
2.5.2



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

* [PATCH 10/12] connman: Fix build with musl
  2015-09-14 16:31 [PATCH 00/12] Fixes with clang Khem Raj
                   ` (8 preceding siblings ...)
  2015-09-14 16:31 ` [PATCH 09/12] quota: Replace using -I= with STAGING_INCDIR Khem Raj
@ 2015-09-14 16:31 ` Khem Raj
  2015-09-14 16:31 ` [PATCH 11/12] waffle: upgrade waffle_1.5.1.bb -> waffle_1.5.2.bb Khem Raj
  2015-09-14 16:31 ` [PATCH 12/12] sysstat: Include needed headers explicitly Khem Raj
  11 siblings, 0 replies; 18+ messages in thread
From: Khem Raj @ 2015-09-14 16:31 UTC (permalink / raw
  To: openembedded-core

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-connectivity/connman/connman.inc      |  1 +
 ...acktrace-API-availability-before-using-it.patch | 55 ++++++++++++++
 ...resolve-musl-does-not-implement-res_ninit.patch | 77 ++++++++++++++++++++
 .../0003-Fix-header-inclusions-for-musl.patch      | 85 ++++++++++++++++++++++
 meta/recipes-connectivity/connman/connman_1.30.bb  |  3 +
 5 files changed, 221 insertions(+)
 create mode 100644 meta/recipes-connectivity/connman/connman/0001-Detect-backtrace-API-availability-before-using-it.patch
 create mode 100644 meta/recipes-connectivity/connman/connman/0002-resolve-musl-does-not-implement-res_ninit.patch
 create mode 100644 meta/recipes-connectivity/connman/connman/0003-Fix-header-inclusions-for-musl.patch

diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman.inc
index 17dc4b9..fd9640e 100644
--- a/meta/recipes-connectivity/connman/connman.inc
+++ b/meta/recipes-connectivity/connman/connman.inc
@@ -30,6 +30,7 @@ EXTRA_OECONF += "\
     --disable-polkit \
     --enable-client \
 "
+CFLAGS += "-D_GNU_SOURCE"
 
 PACKAGECONFIG ??= "wispr \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'systemd','systemd', '', d)} \
diff --git a/meta/recipes-connectivity/connman/connman/0001-Detect-backtrace-API-availability-before-using-it.patch b/meta/recipes-connectivity/connman/connman/0001-Detect-backtrace-API-availability-before-using-it.patch
new file mode 100644
index 0000000..5dc6fd6
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman/0001-Detect-backtrace-API-availability-before-using-it.patch
@@ -0,0 +1,55 @@
+From 00d4447395725abaa651e12ed40095081e04011e Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 13 Sep 2015 13:22:01 -0700
+Subject: [PATCH 1/3] Detect backtrace() API availability before using it
+
+C libraries besides glibc do not have backtrace() implemented
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ configure.ac | 2 ++
+ src/log.c    | 5 ++---
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 69c0eeb..90099f2 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -171,6 +171,8 @@ fi
+ AM_CONDITIONAL(PPTP, test "${enable_pptp}" != "no")
+ AM_CONDITIONAL(PPTP_BUILTIN, test "${enable_pptp}" = "builtin")
+ 
++AC_CHECK_HEADERS([execinfo.h])
++
+ AC_CHECK_HEADERS(resolv.h, dummy=yes,
+ 	AC_MSG_ERROR(resolver header files are required))
+ AC_CHECK_LIB(resolv, ns_initparse, dummy=yes, [
+diff --git a/src/log.c b/src/log.c
+index a693bd0..5b40c1f 100644
+--- a/src/log.c
++++ b/src/log.c
+@@ -30,7 +30,6 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <syslog.h>
+-#include <execinfo.h>
+ #include <dlfcn.h>
+ 
+ #include "connman.h"
+@@ -215,9 +214,9 @@ static void print_backtrace(unsigned int offset)
+ static void signal_handler(int signo)
+ {
+ 	connman_error("Aborting (signal %d) [%s]", signo, program_exec);
+-
++#ifdef HAVE_EXECINFO_H
+ 	print_backtrace(2);
+-
++#endif /* HAVE_EXECINFO_H */
+ 	exit(EXIT_FAILURE);
+ }
+ 
+-- 
+2.5.1
+
diff --git a/meta/recipes-connectivity/connman/connman/0002-resolve-musl-does-not-implement-res_ninit.patch b/meta/recipes-connectivity/connman/connman/0002-resolve-musl-does-not-implement-res_ninit.patch
new file mode 100644
index 0000000..0593427
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman/0002-resolve-musl-does-not-implement-res_ninit.patch
@@ -0,0 +1,77 @@
+From 10b0d16d04b811b1ccd1f9b0cfe757bce8d876a1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 6 Apr 2015 23:02:21 -0700
+Subject: [PATCH 2/3] resolve: musl does not implement res_ninit
+
+ported from
+http://git.alpinelinux.org/cgit/aports/plain/testing/connman/libresolv.patch
+
+Upstream-Status: Pending
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ gweb/gresolv.c | 33 ++++++++++++---------------------
+ 1 file changed, 12 insertions(+), 21 deletions(-)
+
+diff --git a/gweb/gresolv.c b/gweb/gresolv.c
+index 5cf7a9a..3ad8e70 100644
+--- a/gweb/gresolv.c
++++ b/gweb/gresolv.c
+@@ -875,8 +875,6 @@ GResolv *g_resolv_new(int index)
+ 	resolv->index = index;
+ 	resolv->nameserver_list = NULL;
+ 
+-	res_ninit(&resolv->res);
+-
+ 	return resolv;
+ }
+ 
+@@ -916,8 +914,6 @@ void g_resolv_unref(GResolv *resolv)
+ 
+ 	flush_nameservers(resolv);
+ 
+-	res_nclose(&resolv->res);
+-
+ 	g_free(resolv);
+ }
+ 
+@@ -1020,24 +1016,19 @@ guint g_resolv_lookup_hostname(GResolv *resolv, const char *hostname,
+ 	debug(resolv, "hostname %s", hostname);
+ 
+ 	if (!resolv->nameserver_list) {
+-		int i;
+-
+-		for (i = 0; i < resolv->res.nscount; i++) {
+-			char buf[100];
+-			int family = resolv->res.nsaddr_list[i].sin_family;
+-			void *sa_addr = &resolv->res.nsaddr_list[i].sin_addr;
+-
+-			if (family != AF_INET &&
+-					resolv->res._u._ext.nsaddrs[i]) {
+-				family = AF_INET6;
+-				sa_addr = &resolv->res._u._ext.nsaddrs[i]->sin6_addr;
++		FILE *f = fopen("/etc/resolv.conf", "r");
++		if (f) {
++			char line[256], *s;
++			int i;
++			while (fgets(line, sizeof(line), f)) {
++				if (strncmp(line, "nameserver", 10) || !isspace(line[10]))
++					continue;
++				for (s = &line[11]; isspace(s[0]); s++);
++				for (i = 0; s[i] && !isspace(s[i]); i++);
++				s[i] = 0;
++				g_resolv_add_nameserver(resolv, s, 53, 0);
+ 			}
+-
+-			if (family != AF_INET && family != AF_INET6)
+-				continue;
+-
+-			if (inet_ntop(family, sa_addr, buf, sizeof(buf)))
+-				g_resolv_add_nameserver(resolv, buf, 53, 0);
++			fclose(f);
+ 		}
+ 
+ 		if (!resolv->nameserver_list)
+-- 
+2.5.1
+
diff --git a/meta/recipes-connectivity/connman/connman/0003-Fix-header-inclusions-for-musl.patch b/meta/recipes-connectivity/connman/connman/0003-Fix-header-inclusions-for-musl.patch
new file mode 100644
index 0000000..6327aa2
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman/0003-Fix-header-inclusions-for-musl.patch
@@ -0,0 +1,85 @@
+From 67645a01a2f3f52625d8dd77f2811a9e213e1b7d Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Sun, 13 Sep 2015 13:28:20 -0700
+Subject: [PATCH] Fix header inclusions for musl
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ gweb/gresolv.c        | 1 +
+ plugins/wifi.c        | 3 +--
+ src/tethering.c       | 2 --
+ tools/dhcp-test.c     | 1 -
+ tools/dnsproxy-test.c | 1 +
+ 5 files changed, 3 insertions(+), 5 deletions(-)
+
+diff --git a/gweb/gresolv.c b/gweb/gresolv.c
+index 3ad8e70..61d6fe8 100644
+--- a/gweb/gresolv.c
++++ b/gweb/gresolv.c
+@@ -28,6 +28,7 @@
+ #include <stdarg.h>
+ #include <string.h>
+ #include <stdlib.h>
++#include <stdio.h>
+ #include <resolv.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
+diff --git a/plugins/wifi.c b/plugins/wifi.c
+index dfe849f..99cff3f 100644
+--- a/plugins/wifi.c
++++ b/plugins/wifi.c
+@@ -30,9 +30,8 @@
+ #include <string.h>
+ #include <sys/ioctl.h>
+ #include <sys/socket.h>
+-#include <linux/if_arp.h>
+-#include <linux/wireless.h>
+ #include <net/ethernet.h>
++#include <linux/wireless.h>
+ 
+ #ifndef IFF_LOWER_UP
+ #define IFF_LOWER_UP	0x10000
+diff --git a/src/tethering.c b/src/tethering.c
+index ceeec74..c44cb36 100644
+--- a/src/tethering.c
++++ b/src/tethering.c
+@@ -31,10 +31,8 @@
+ #include <stdio.h>
+ #include <sys/ioctl.h>
+ #include <net/if.h>
+-#include <linux/sockios.h>
+ #include <string.h>
+ #include <fcntl.h>
+-#include <linux/if_tun.h>
+ #include <netinet/in.h>
+ #include <linux/if_bridge.h>
+ 
+diff --git a/tools/dhcp-test.c b/tools/dhcp-test.c
+index c34e10a..eae66fc 100644
+--- a/tools/dhcp-test.c
++++ b/tools/dhcp-test.c
+@@ -33,7 +33,6 @@
+ #include <arpa/inet.h>
+ #include <net/route.h>
+ #include <net/ethernet.h>
+-#include <linux/if_arp.h>
+ 
+ #include <gdhcp/gdhcp.h>
+ 
+diff --git a/tools/dnsproxy-test.c b/tools/dnsproxy-test.c
+index 551cae9..226ba86 100644
+--- a/tools/dnsproxy-test.c
++++ b/tools/dnsproxy-test.c
+@@ -27,6 +27,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <unistd.h>
++#include <stdio.h>
+ #include <arpa/inet.h>
+ #include <netinet/in.h>
+ #include <sys/types.h>
+-- 
+2.5.1
+
diff --git a/meta/recipes-connectivity/connman/connman_1.30.bb b/meta/recipes-connectivity/connman/connman_1.30.bb
index 8c47353..9b512c5 100644
--- a/meta/recipes-connectivity/connman/connman_1.30.bb
+++ b/meta/recipes-connectivity/connman/connman_1.30.bb
@@ -3,6 +3,9 @@ require connman.inc
 SRC_URI  = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
             file://0001-plugin.h-Change-visibility-to-default-for-debug-symb.patch \
             file://add_xuser_dbus_permission.patch \
+            file://0001-Detect-backtrace-API-availability-before-using-it.patch \
+            file://0002-resolve-musl-does-not-implement-res_ninit.patch \
+            file://0003-Fix-header-inclusions-for-musl.patch \
             file://connman \
             "
 SRC_URI[md5sum] = "4a3efdbd6796922db9c6f66da57887fa"
-- 
2.5.2



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

* [PATCH 11/12] waffle: upgrade waffle_1.5.1.bb -> waffle_1.5.2.bb
  2015-09-14 16:31 [PATCH 00/12] Fixes with clang Khem Raj
                   ` (9 preceding siblings ...)
  2015-09-14 16:31 ` [PATCH 10/12] connman: Fix build with musl Khem Raj
@ 2015-09-14 16:31 ` Khem Raj
  2015-09-18 20:21   ` Burton, Ross
  2015-09-14 16:31 ` [PATCH 12/12] sysstat: Include needed headers explicitly Khem Raj
  11 siblings, 1 reply; 18+ messages in thread
From: Khem Raj @ 2015-09-14 16:31 UTC (permalink / raw
  To: openembedded-core

Backport needed patches for compilation fixes on musl

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ...-threads-Use-PTHREAD_MUTEX_RECURSIVE-by-d.patch | 54 ++++++++++++++++++++++
 .../waffle/{waffle_1.5.1.bb => waffle_1.5.2.bb}    |  8 ++--
 2 files changed, 59 insertions(+), 3 deletions(-)
 create mode 100644 meta/recipes-graphics/waffle/waffle/0001-third_party-threads-Use-PTHREAD_MUTEX_RECURSIVE-by-d.patch
 rename meta/recipes-graphics/waffle/{waffle_1.5.1.bb => waffle_1.5.2.bb} (84%)

diff --git a/meta/recipes-graphics/waffle/waffle/0001-third_party-threads-Use-PTHREAD_MUTEX_RECURSIVE-by-d.patch b/meta/recipes-graphics/waffle/waffle/0001-third_party-threads-Use-PTHREAD_MUTEX_RECURSIVE-by-d.patch
new file mode 100644
index 0000000..a0c826e
--- /dev/null
+++ b/meta/recipes-graphics/waffle/waffle/0001-third_party-threads-Use-PTHREAD_MUTEX_RECURSIVE-by-d.patch
@@ -0,0 +1,54 @@
+From 3b9b8f5f6d1b99af43e95ec0868404e552a85b73 Mon Sep 17 00:00:00 2001
+From: Emil Velikov <emil.l.velikov@gmail.com>
+Date: Thu, 19 Mar 2015 22:26:11 +0000
+Subject: [PATCH] third_party/threads: Use PTHREAD_MUTEX_RECURSIVE by default
+
+PTHREAD_MUTEX_RECURSIVE_NP was used for compatibility with old glibc.
+Although due to the_GNU_SOURCES define the portable,
+PTHREAD_MUTEX_RECURSIVE will be available for Linuxes since at least
+1998. Simplify things giving us compatibility with musl which
+apparently does not provide the non-portable define.
+
+Inspired by almost identical commit in mesa aead7fe2e2b(c11/threads: Use
+PTHREAD_MUTEX_RECURSIVE by default) by Felix Janda.
+
+Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
+Reviewed-by: Chad Versace <chad.versace@intel.com>
+---
+Upstream-Status: Backport
+
+ third_party/threads/threads_posix.c | 10 ++++------
+ 1 file changed, 4 insertions(+), 6 deletions(-)
+
+diff --git a/third_party/threads/threads_posix.c b/third_party/threads/threads_posix.c
+index 5835e43..e122bf9 100644
+--- a/third_party/threads/threads_posix.c
++++ b/third_party/threads/threads_posix.c
+@@ -26,6 +26,9 @@
+  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+  * DEALINGS IN THE SOFTWARE.
+  */
++
++#define _GNU_SOURCE
++
+ #include <stdlib.h>
+ #ifndef assert
+ #include <assert.h>
+@@ -150,13 +153,8 @@ int mtx_init(mtx_t *mtx, int type)
+       && type != (mtx_try|mtx_recursive))
+         return thrd_error;
+     pthread_mutexattr_init(&attr);
+-    if ((type & mtx_recursive) != 0) {
+-#if defined(__linux__) || defined(__linux)
+-        pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
+-#else
++    if ((type & mtx_recursive) != 0)
+         pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
+-#endif
+-    }
+     pthread_mutex_init(mtx, &attr);
+     pthread_mutexattr_destroy(&attr);
+     return thrd_success;
+-- 
+2.5.2
+
diff --git a/meta/recipes-graphics/waffle/waffle_1.5.1.bb b/meta/recipes-graphics/waffle/waffle_1.5.2.bb
similarity index 84%
rename from meta/recipes-graphics/waffle/waffle_1.5.1.bb
rename to meta/recipes-graphics/waffle/waffle_1.5.2.bb
index b8aa05a..6923f1c 100644
--- a/meta/recipes-graphics/waffle/waffle_1.5.1.bb
+++ b/meta/recipes-graphics/waffle/waffle_1.5.2.bb
@@ -3,9 +3,11 @@ LICENSE = "BSD-2-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=4c5154407c2490750dd461c50ad94797 \
                     file://include/waffle/waffle.h;endline=24;md5=61dbf8697f61c78645e75a93c585b1bf"
 
-SRC_URI = "http://waffle-gl.org/files/release/${BPN}-${PV}/${BPN}-${PV}.tar.xz"
-SRC_URI[md5sum] = "c0d802bc3d0aba87c51e423a3a8bdd69"
-SRC_URI[sha256sum] = "cbab0e926515064e818bf089a5af04be33307e5f40d07659fb40d59b2bfe20aa"
+SRC_URI = "http://waffle-gl.org/files/release/${BPN}-${PV}/${BPN}-${PV}.tar.xz \
+           file://0001-third_party-threads-Use-PTHREAD_MUTEX_RECURSIVE-by-d.patch \
+          "
+SRC_URI[md5sum] = "c669c91bf2f7e13a5d781c3dbb30fd8c"
+SRC_URI[sha256sum] = "d2c096cf654bf0061323a4b9231a1ef5b749a1e5c7c5bfe067e964219c2a851c"
 
 inherit cmake distro_features_check lib_package
 
-- 
2.5.2



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

* [PATCH 12/12] sysstat: Include needed headers explicitly
  2015-09-14 16:31 [PATCH 00/12] Fixes with clang Khem Raj
                   ` (10 preceding siblings ...)
  2015-09-14 16:31 ` [PATCH 11/12] waffle: upgrade waffle_1.5.1.bb -> waffle_1.5.2.bb Khem Raj
@ 2015-09-14 16:31 ` Khem Raj
  11 siblings, 0 replies; 18+ messages in thread
From: Khem Raj @ 2015-09-14 16:31 UTC (permalink / raw
  To: openembedded-core

It depends on defines from .h files that are not includes as part of
source file, on glibc it works because they get included indirectly but
that can change any time since its internal glibc behaviour, at user
level the header needed should be explicitly included.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../0001-Include-needed-headers-explicitly.patch   | 62 ++++++++++++++++++++++
 meta/recipes-extended/sysstat/sysstat_11.1.5.bb    |  2 +
 2 files changed, 64 insertions(+)
 create mode 100644 meta/recipes-extended/sysstat/sysstat/0001-Include-needed-headers-explicitly.patch

diff --git a/meta/recipes-extended/sysstat/sysstat/0001-Include-needed-headers-explicitly.patch b/meta/recipes-extended/sysstat/sysstat/0001-Include-needed-headers-explicitly.patch
new file mode 100644
index 0000000..c126523
--- /dev/null
+++ b/meta/recipes-extended/sysstat/sysstat/0001-Include-needed-headers-explicitly.patch
@@ -0,0 +1,62 @@
+From 42325faa88d64cce799977d611b2792beb154643 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 14 Sep 2015 08:36:59 +0000
+Subject: [PATCH] Include needed headers explicitly
+
+on glibc these headers get pulled in indirectly via other .h files
+but right fix is to include them directly when used
+
+fixes
+
+error: use of undeclared identifier 'PATH_MAX'
+error: called object type 'unsigned int' is not a function or function pointer
+dm_major = major(aux.st_rdev);
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Pending
+
+ common.c    | 1 +
+ ioconf.c    | 1 +
+ sa_common.c | 1 +
+ 3 files changed, 3 insertions(+)
+
+diff --git a/common.c b/common.c
+index a23155b..ad86446 100644
+--- a/common.c
++++ b/common.c
+@@ -20,6 +20,7 @@
+  */
+ 
+ #include <stdio.h>
++#include <limits.h>
+ #include <string.h>
+ #include <stdlib.h>
+ #include <time.h>
+diff --git a/ioconf.c b/ioconf.c
+index 7d88c5d..6d67691 100644
+--- a/ioconf.c
++++ b/ioconf.c
+@@ -27,6 +27,7 @@
+ #include <errno.h>
+ #include <dirent.h>
+ #include <sys/stat.h>
++#include <sys/types.h>
+ 
+ #include "ioconf.h"
+ #include "common.h"
+diff --git a/sa_common.c b/sa_common.c
+index b7351d9..c9e3299 100644
+--- a/sa_common.c
++++ b/sa_common.c
+@@ -20,6 +20,7 @@
+  */
+ 
+ #include <stdio.h>
++#include <limits.h>
+ #include <string.h>
+ #include <stdlib.h>
+ #include <time.h>
+-- 
+2.5.2
+
diff --git a/meta/recipes-extended/sysstat/sysstat_11.1.5.bb b/meta/recipes-extended/sysstat/sysstat_11.1.5.bb
index 69d2ec2..bff8616 100644
--- a/meta/recipes-extended/sysstat/sysstat_11.1.5.bb
+++ b/meta/recipes-extended/sysstat/sysstat_11.1.5.bb
@@ -2,6 +2,8 @@ require sysstat.inc
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
 
+SRC_URI += "file://0001-Include-needed-headers-explicitly.patch"
+
 SRC_URI[md5sum] = "4d8e6e72d057189a1660462a678d9ada"
 SRC_URI[sha256sum] = "feb3a90d86ffd69cf5b88144a8876ae05bd42384f559676f08100671589fa2bb"
 
-- 
2.5.2



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

* Re: [PATCH 02/12] hostap-utils: Use C99 stddefs in defining local typedefs
  2015-09-14 16:31 ` [PATCH 02/12] hostap-utils: Use C99 stddefs in defining local typedefs Khem Raj
@ 2015-09-15  6:33   ` Mikko.Rapeli
  2015-09-15 15:13     ` Khem Raj
  0 siblings, 1 reply; 18+ messages in thread
From: Mikko.Rapeli @ 2015-09-15  6:33 UTC (permalink / raw
  To: raj.khem; +Cc: openembedded-core

On Mon, Sep 14, 2015 at 04:31:17PM +0000, Khem Raj wrote:
> The code is creating more abstract types which is nice however it should
> be using standard defines from stdint.h and not random defines to base
> its own type system

These types are not random. They are standard Linux kernel types used by headers
exported to userspace and their definitions come from <linux/types.h>.
These headers should not depend on libc headers like stdint.h.

Also, this file is actually a convenience copy of <linux/wireless.h> which should
be used directly instead.

-Mikko

> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  ...-__s32-__u16-__s16-__u8-in-terms-of-c99-t.patch | 36 ++++++++++++++++++++++
>  meta/recipes-bsp/hostap/hostap-utils.inc           |  4 ++-
>  2 files changed, 39 insertions(+), 1 deletion(-)
>  create mode 100644 meta/recipes-bsp/hostap/hostap-utils-0.4.7/0001-Define-_u32-__s32-__u16-__s16-__u8-in-terms-of-c99-t.patch
> 
> diff --git a/meta/recipes-bsp/hostap/hostap-utils-0.4.7/0001-Define-_u32-__s32-__u16-__s16-__u8-in-terms-of-c99-t.patch b/meta/recipes-bsp/hostap/hostap-utils-0.4.7/0001-Define-_u32-__s32-__u16-__s16-__u8-in-terms-of-c99-t.patch
> new file mode 100644
> index 0000000..b44dca3
> --- /dev/null
> +++ b/meta/recipes-bsp/hostap/hostap-utils-0.4.7/0001-Define-_u32-__s32-__u16-__s16-__u8-in-terms-of-c99-t.patch
> @@ -0,0 +1,36 @@
> +From 742fb110d9841a04b3ced256b0bf80ff304dcaff Mon Sep 17 00:00:00 2001
> +From: Khem Raj <raj.khem@gmail.com>
> +Date: Mon, 31 Aug 2015 05:45:08 +0000
> +Subject: [PATCH] Define _u32/__s32/__u16/__s16/__u8 in terms of c99 types
> +
> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
> +---
> +Upstream-Status: Pending
> +
> + wireless_copy.h | 10 +++++-----
> + 1 file changed, 5 insertions(+), 5 deletions(-)
> +
> +diff --git a/wireless_copy.h b/wireless_copy.h
> +index 8208258..1171a35 100644
> +--- a/wireless_copy.h
> ++++ b/wireless_copy.h
> +@@ -86,11 +86,11 @@
> + #else
> + #include <sys/types.h>
> + #include <net/if.h>
> +-typedef __uint32_t __u32;
> +-typedef __int32_t __s32;
> +-typedef __uint16_t __u16;
> +-typedef __int16_t __s16;
> +-typedef __uint8_t __u8;
> ++typedef u_int32_t __u32;
> ++typedef int32_t __s32;
> ++typedef u_int16_t __u16;
> ++typedef int16_t __s16;
> ++typedef u_int8_t __u8;
> + #ifndef __user
> + #define __user
> + #endif /* __user */
> +-- 
> +2.5.1
> +
> diff --git a/meta/recipes-bsp/hostap/hostap-utils.inc b/meta/recipes-bsp/hostap/hostap-utils.inc
> index 89d977a..140321d 100644
> --- a/meta/recipes-bsp/hostap/hostap-utils.inc
> +++ b/meta/recipes-bsp/hostap/hostap-utils.inc
> @@ -10,7 +10,9 @@ SECTION = "kernel/userland"
>  PR = "r4"
>  
>  SRC_URI = "http://hostap.epitest.fi/releases/hostap-utils-${PV}.tar.gz \
> -	   file://hostap-fw-load.patch"
> +           file://hostap-fw-load.patch \
> +           file://0001-Define-_u32-__s32-__u16-__s16-__u8-in-terms-of-c99-t.patch \
> +"
>  S = "${WORKDIR}/hostap-utils-${PV}"
>  
>  BINARIES = "hostap_crypt_conf hostap_diag hostap_fw_load hostap_io_debug \
> -- 
> 2.5.2
> 
> -- 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

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

* Re: [PATCH 02/12] hostap-utils: Use C99 stddefs in defining local typedefs
  2015-09-15  6:33   ` Mikko.Rapeli
@ 2015-09-15 15:13     ` Khem Raj
  2015-09-16  6:01       ` Mikko.Rapeli
  0 siblings, 1 reply; 18+ messages in thread
From: Khem Raj @ 2015-09-15 15:13 UTC (permalink / raw
  To: Mikko.Rapeli; +Cc: Patches and discussions about the oe-core layer

On Mon, Sep 14, 2015 at 11:33 PM,  <Mikko.Rapeli@bmw.de> wrote:
> On Mon, Sep 14, 2015 at 04:31:17PM +0000, Khem Raj wrote:
>> The code is creating more abstract types which is nice however it should
>> be using standard defines from stdint.h and not random defines to base
>> its own type system
>
> These types are not random. They are standard Linux kernel types used by headers
> exported to userspace and their definitions come from <linux/types.h>.
> These headers should not depend on libc headers like stdint.h.

Right they are not random in general but they are randomly being
redefined by the application,
if it should be using linux/types.h those are different types than
what is being defined here. I have just
made the semantics of existing logic to be more c99 compliant.

>
> Also, this file is actually a convenience copy of <linux/wireless.h> which should
> be used directly instead.

There must be a reason to make own copy. May be hostap-utils want to
be portable to more than linux

>
> -Mikko
>
>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> ---
>>  ...-__s32-__u16-__s16-__u8-in-terms-of-c99-t.patch | 36 ++++++++++++++++++++++
>>  meta/recipes-bsp/hostap/hostap-utils.inc           |  4 ++-
>>  2 files changed, 39 insertions(+), 1 deletion(-)
>>  create mode 100644 meta/recipes-bsp/hostap/hostap-utils-0.4.7/0001-Define-_u32-__s32-__u16-__s16-__u8-in-terms-of-c99-t.patch
>>
>> diff --git a/meta/recipes-bsp/hostap/hostap-utils-0.4.7/0001-Define-_u32-__s32-__u16-__s16-__u8-in-terms-of-c99-t.patch b/meta/recipes-bsp/hostap/hostap-utils-0.4.7/0001-Define-_u32-__s32-__u16-__s16-__u8-in-terms-of-c99-t.patch
>> new file mode 100644
>> index 0000000..b44dca3
>> --- /dev/null
>> +++ b/meta/recipes-bsp/hostap/hostap-utils-0.4.7/0001-Define-_u32-__s32-__u16-__s16-__u8-in-terms-of-c99-t.patch
>> @@ -0,0 +1,36 @@
>> +From 742fb110d9841a04b3ced256b0bf80ff304dcaff Mon Sep 17 00:00:00 2001
>> +From: Khem Raj <raj.khem@gmail.com>
>> +Date: Mon, 31 Aug 2015 05:45:08 +0000
>> +Subject: [PATCH] Define _u32/__s32/__u16/__s16/__u8 in terms of c99 types
>> +
>> +Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> +---
>> +Upstream-Status: Pending
>> +
>> + wireless_copy.h | 10 +++++-----
>> + 1 file changed, 5 insertions(+), 5 deletions(-)
>> +
>> +diff --git a/wireless_copy.h b/wireless_copy.h
>> +index 8208258..1171a35 100644
>> +--- a/wireless_copy.h
>> ++++ b/wireless_copy.h
>> +@@ -86,11 +86,11 @@
>> + #else
>> + #include <sys/types.h>
>> + #include <net/if.h>
>> +-typedef __uint32_t __u32;
>> +-typedef __int32_t __s32;
>> +-typedef __uint16_t __u16;
>> +-typedef __int16_t __s16;
>> +-typedef __uint8_t __u8;
>> ++typedef u_int32_t __u32;
>> ++typedef int32_t __s32;
>> ++typedef u_int16_t __u16;
>> ++typedef int16_t __s16;
>> ++typedef u_int8_t __u8;
>> + #ifndef __user
>> + #define __user
>> + #endif /* __user */
>> +--
>> +2.5.1
>> +
>> diff --git a/meta/recipes-bsp/hostap/hostap-utils.inc b/meta/recipes-bsp/hostap/hostap-utils.inc
>> index 89d977a..140321d 100644
>> --- a/meta/recipes-bsp/hostap/hostap-utils.inc
>> +++ b/meta/recipes-bsp/hostap/hostap-utils.inc
>> @@ -10,7 +10,9 @@ SECTION = "kernel/userland"
>>  PR = "r4"
>>
>>  SRC_URI = "http://hostap.epitest.fi/releases/hostap-utils-${PV}.tar.gz \
>> -        file://hostap-fw-load.patch"
>> +           file://hostap-fw-load.patch \
>> +           file://0001-Define-_u32-__s32-__u16-__s16-__u8-in-terms-of-c99-t.patch \
>> +"
>>  S = "${WORKDIR}/hostap-utils-${PV}"
>>
>>  BINARIES = "hostap_crypt_conf hostap_diag hostap_fw_load hostap_io_debug \
>> --
>> 2.5.2
>>
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core


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

* Re: [PATCH 02/12] hostap-utils: Use C99 stddefs in defining local typedefs
  2015-09-15 15:13     ` Khem Raj
@ 2015-09-16  6:01       ` Mikko.Rapeli
  0 siblings, 0 replies; 18+ messages in thread
From: Mikko.Rapeli @ 2015-09-16  6:01 UTC (permalink / raw
  To: raj.khem; +Cc: openembedded-core

On Tue, Sep 15, 2015 at 08:13:26AM -0700, Khem Raj wrote:
> On Mon, Sep 14, 2015 at 11:33 PM,  <Mikko.Rapeli@bmw.de> wrote:
> > On Mon, Sep 14, 2015 at 04:31:17PM +0000, Khem Raj wrote:
> >> The code is creating more abstract types which is nice however it should
> >> be using standard defines from stdint.h and not random defines to base
> >> its own type system
> >
> > These types are not random. They are standard Linux kernel types used by headers
> > exported to userspace and their definitions come from <linux/types.h>.
> > These headers should not depend on libc headers like stdint.h.
> 
> Right they are not random in general but they are randomly being
> redefined by the application,
> if it should be using linux/types.h those are different types than
> what is being defined here. I have just
> made the semantics of existing logic to be more c99 compliant.
> 
> >
> > Also, this file is actually a convenience copy of <linux/wireless.h> which should
> > be used directly instead.
> 
> There must be a reason to make own copy. May be hostap-utils want to
> be portable to more than linux

A private copy of <linux/wireless.h> is only usefull with Linux kernel. Since
mid 2000's Linux kernel has a way to properly export these headers to
userspace. Thus the private copies should not be needed anymore.

-Mikko

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

* Re: [PATCH 11/12] waffle: upgrade waffle_1.5.1.bb -> waffle_1.5.2.bb
  2015-09-14 16:31 ` [PATCH 11/12] waffle: upgrade waffle_1.5.1.bb -> waffle_1.5.2.bb Khem Raj
@ 2015-09-18 20:21   ` Burton, Ross
  2015-09-18 21:04     ` Khem Raj
  0 siblings, 1 reply; 18+ messages in thread
From: Burton, Ross @ 2015-09-18 20:21 UTC (permalink / raw
  To: Khem Raj; +Cc: OE-core

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

Hi Khem,

On 14 September 2015 at 17:31, Khem Raj <raj.khem@gmail.com> wrote:

>  .../waffle/{waffle_1.5.1.bb => waffle_1.5.2.bb}    |  8 ++--
>

Sorry but you missed the M3 build, can you backport the fixes to 1.5.1
instead?

Ross

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

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

* Re: [PATCH 11/12] waffle: upgrade waffle_1.5.1.bb -> waffle_1.5.2.bb
  2015-09-18 20:21   ` Burton, Ross
@ 2015-09-18 21:04     ` Khem Raj
  0 siblings, 0 replies; 18+ messages in thread
From: Khem Raj @ 2015-09-18 21:04 UTC (permalink / raw
  To: Burton, Ross; +Cc: OE-core

On Fri, Sep 18, 2015 at 1:21 PM, Burton, Ross <ross.burton@intel.com> wrote:
> Hi Khem,
>
> On 14 September 2015 at 17:31, Khem Raj <raj.khem@gmail.com> wrote:
>>
>>  .../waffle/{waffle_1.5.1.bb => waffle_1.5.2.bb}    |  8 ++--
>
>
> Sorry but you missed the M3 build, can you backport the fixes to 1.5.1
> instead?
>

OK, ignore this one for now then I will queue the new fix with next
lot which is all about fixes and no upgrades


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

end of thread, other threads:[~2015-09-18 21:04 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-14 16:31 [PATCH 00/12] Fixes with clang Khem Raj
2015-09-14 16:31 ` [PATCH 01/12] xz: Correctly specify GPL-3.0 with autoconf exception Khem Raj
2015-09-14 16:31 ` [PATCH 02/12] hostap-utils: Use C99 stddefs in defining local typedefs Khem Raj
2015-09-15  6:33   ` Mikko.Rapeli
2015-09-15 15:13     ` Khem Raj
2015-09-16  6:01       ` Mikko.Rapeli
2015-09-14 16:31 ` [PATCH 03/12] xorg-driver: Fix logical && with bitwise and operation Khem Raj
2015-09-14 16:31 ` [PATCH 04/12] qt4: Fix kmap2qmap build with clang Khem Raj
2015-09-14 16:31 ` [PATCH 05/12] gummiboot: Fix build warnings seen with gcc5 Khem Raj
2015-09-14 16:31 ` [PATCH 06/12] gnu-efi, syslinux: Support gcc < 4.7 Khem Raj
2015-09-14 16:31 ` [PATCH 07/12] syslinux: Dont bypass gcc driver for dependency generation options Khem Raj
2015-09-14 16:31 ` [PATCH 08/12] opkg: Include stdio.h for FILE definition Khem Raj
2015-09-14 16:31 ` [PATCH 09/12] quota: Replace using -I= with STAGING_INCDIR Khem Raj
2015-09-14 16:31 ` [PATCH 10/12] connman: Fix build with musl Khem Raj
2015-09-14 16:31 ` [PATCH 11/12] waffle: upgrade waffle_1.5.1.bb -> waffle_1.5.2.bb Khem Raj
2015-09-18 20:21   ` Burton, Ross
2015-09-18 21:04     ` Khem Raj
2015-09-14 16:31 ` [PATCH 12/12] sysstat: Include needed headers explicitly Khem Raj

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.