The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / uboot-tools / 0003-Fix-musl-build.patch
1 From bf738fda390787a10db0c9a4be9fcafd6707a90e Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause@embedded.rocks>
3 Date: Sat, 18 Apr 2015 08:00:46 +0200
4 Subject: [PATCH 1/1] Fix musl build
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 This patch fixes cross-compiling U-Boot tools with the musl C library:
10   * including <sys/types.h> is needed for ulong
11   * defining _GNU_SOURCE is needed for loff_t
12
13 Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
14 ---
15  include/image.h    | 1 +
16  tools/env/fw_env.c | 2 ++
17  tools/imagetool.h  | 1 +
18  tools/proftool.c   | 1 +
19  4 files changed, 5 insertions(+)
20
21 diff --git a/include/image.h b/include/image.h
22 index 3844be6..ac2fd6e 100644
23 --- a/include/image.h
24 +++ b/include/image.h
25 @@ -18,6 +18,7 @@
26
27  #include "compiler.h"
28  #include <asm/byteorder.h>
29 +#include <sys/types.h>
30
31  /* Define this to avoid #ifdefs later on */
32  struct lmb;
33 diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c
34 index 1173eea..daa02a7 100644
35 --- a/tools/env/fw_env.c
36 +++ b/tools/env/fw_env.c
37 @@ -8,6 +8,8 @@
38   * SPDX-License-Identifier:    GPL-2.0+
39   */
40
41 +#define _GNU_SOURCE
42 +
43  #include <errno.h>
44  #include <env_flags.h>
45  #include <fcntl.h>
46 diff --git a/tools/imagetool.h b/tools/imagetool.h
47 index 3e15b4e..b7874f4 100644
48 --- a/tools/imagetool.h
49 +++ b/tools/imagetool.h
50 @@ -16,6 +16,7 @@
51  #include <stdlib.h>
52  #include <string.h>
53  #include <sys/stat.h>
54 +#include <sys/types.h>
55  #include <time.h>
56  #include <unistd.h>
57  #include <u-boot/sha1.h>
58 diff --git a/tools/proftool.c b/tools/proftool.c
59 index 3482951..9ce7a77 100644
60 --- a/tools/proftool.c
61 +++ b/tools/proftool.c
62 @@ -16,6 +16,7 @@
63  #include <string.h>
64  #include <unistd.h>
65  #include <sys/param.h>
66 +#include <sys/types.h>
67
68  #include <compiler.h>
69  #include <trace.h>
70 --
71 2.3.5