diff options
2 files changed, 45 insertions, 0 deletions
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 0000000000..0a81a22526 --- /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 @@ | |||
| 1 | From ab725a3faaeead90ae3c63cbcd370af087c413a5 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | ||
| 3 | Date: Mon, 27 Mar 2017 17:55:06 -0700 | ||
| 4 | Subject: [PATCH] addrdb/coord-config-parse.y: add missing <time.h> include | ||
| 5 | MIME-Version: 1.0 | ||
| 6 | Content-Type: text/plain; charset=UTF-8 | ||
| 7 | Content-Transfer-Encoding: 8bit | ||
| 8 | |||
| 9 | The %union definition uses the time_t structure. In order to use this | ||
| 10 | structure, the <time.h> header has to be included. Otherwise, the build | ||
| 11 | breaks with some C libraries, such as musl: | ||
| 12 | |||
| 13 | In file included from coord-config-lex.l:23:0: | ||
| 14 | coord-config-parse.y:107:2: error: unknown type name ‘time_t’ | ||
| 15 | time_t timestamp; | ||
| 16 | ^ | ||
| 17 | |||
| 18 | This patch includes <time.h> using the '%code requires' directive of | ||
| 19 | Yacc. | ||
| 20 | |||
| 21 | Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | ||
| 22 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 23 | --- | ||
| 24 | addrdb/coord-config-parse.y | 4 ++++ | ||
| 25 | 1 file changed, 4 insertions(+) | ||
| 26 | |||
| 27 | diff --git a/addrdb/coord-config-parse.y b/addrdb/coord-config-parse.y | ||
| 28 | index 2e10a88..85ee058 100644 | ||
| 29 | --- a/addrdb/coord-config-parse.y | ||
| 30 | +++ b/addrdb/coord-config-parse.y | ||
| 31 | @@ -102,6 +102,10 @@ | ||
| 32 | |||
| 33 | %} | ||
| 34 | |||
| 35 | +%code requires { | ||
| 36 | +#include <time.h> | ||
| 37 | +} | ||
| 38 | + | ||
| 39 | %union { | ||
| 40 | unsigned long number; | ||
| 41 | time_t timestamp; | ||
| 42 | -- | ||
| 43 | 2.12.1 | ||
| 44 | |||
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 8c7dbc09af..139eb788f7 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}" | |||
| 11 | SRC_URI = "git://git.code.sf.net/p/linux-zigbee/linux-zigbee \ | 11 | SRC_URI = "git://git.code.sf.net/p/linux-zigbee/linux-zigbee \ |
| 12 | file://no-help2man.patch \ | 12 | file://no-help2man.patch \ |
| 13 | file://0001-Fix-build-errors-with-clang.patch \ | 13 | file://0001-Fix-build-errors-with-clang.patch \ |
| 14 | file://0001-addrdb-coord-config-parse.y-add-missing-time.h-inclu.patch \ | ||
| 14 | " | 15 | " |
| 15 | SRCREV = "38f42dbfce9e13629263db3bd3b81f14c69bb733" | 16 | SRCREV = "38f42dbfce9e13629263db3bd3b81f14c69bb733" |
| 16 | 17 | ||
