From b57ae5a2bdd25b9ead53561d36160b087ca56565 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 27 Mar 2017 17:59:24 -0700 Subject: lowpan-tools: Fix build with musl Signed-off-by: Khem Raj Signed-off-by: Joe MacDonald --- ...d-config-parse.y-add-missing-time.h-inclu.patch | 44 ++++++++++++++++++++++ .../lowpan-tools/lowpan-tools_git.bb | 1 + 2 files changed, 45 insertions(+) create mode 100644 meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-addrdb-coord-config-parse.y-add-missing-time.h-inclu.patch (limited to 'meta-networking/recipes-support/lowpan-tools') diff --git a/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-addrdb-coord-config-parse.y-add-missing-time.h-inclu.patch b/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-addrdb-coord-config-parse.y-add-missing-time.h-inclu.patch new file mode 100644 index 000000000..0a81a2252 --- /dev/null +++ b/meta-networking/recipes-support/lowpan-tools/lowpan-tools/0001-addrdb-coord-config-parse.y-add-missing-time.h-inclu.patch @@ -0,0 +1,44 @@ +From ab725a3faaeead90ae3c63cbcd370af087c413a5 Mon Sep 17 00:00:00 2001 +From: Thomas Petazzoni +Date: Mon, 27 Mar 2017 17:55:06 -0700 +Subject: [PATCH] addrdb/coord-config-parse.y: add missing include +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The %union definition uses the time_t structure. In order to use this +structure, the header has to be included. Otherwise, the build +breaks with some C libraries, such as musl: + +In file included from coord-config-lex.l:23:0: +coord-config-parse.y:107:2: error: unknown type name ‘time_t’ + time_t timestamp; + ^ + +This patch includes using the '%code requires' directive of +Yacc. + +Signed-off-by: Thomas Petazzoni +Signed-off-by: Khem Raj +--- + addrdb/coord-config-parse.y | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/addrdb/coord-config-parse.y b/addrdb/coord-config-parse.y +index 2e10a88..85ee058 100644 +--- a/addrdb/coord-config-parse.y ++++ b/addrdb/coord-config-parse.y +@@ -102,6 +102,10 @@ + + %} + ++%code requires { ++#include ++} ++ + %union { + unsigned long number; + time_t timestamp; +-- +2.12.1 + diff --git a/meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb b/meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb index 8c7dbc09a..139eb788f 100644 --- a/meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb +++ b/meta-networking/recipes-support/lowpan-tools/lowpan-tools_git.bb @@ -11,6 +11,7 @@ PV = "0.3.1+git${SRCPV}" SRC_URI = "git://git.code.sf.net/p/linux-zigbee/linux-zigbee \ file://no-help2man.patch \ file://0001-Fix-build-errors-with-clang.patch \ + file://0001-addrdb-coord-config-parse.y-add-missing-time.h-inclu.patch \ " SRCREV = "38f42dbfce9e13629263db3bd3b81f14c69bb733" -- cgit v1.2.3-54-g00ecf