diff options
author | Marcin Juszkiewicz <marcin@buglabs.net> | 2009-02-26 16:13:46 +0100 |
---|---|---|
committer | Marcin Juszkiewicz <marcin@buglabs.net> | 2009-02-26 16:13:46 +0100 |
commit | 7fe3c30100a1788605b4dd407b713ab7da463e41 (patch) | |
tree | 7adc10f7b1efcdd51d80a4f217d4a98df66cd899 | |
parent | 1bcb06beeeb62a0fc88c0c9f1cc1e77fa8b17389 (diff) | |
download | poky-7fe3c30100a1788605b4dd407b713ab7da463e41.tar.gz |
mtd-utils: fix building with glibc 2.7+ (backported from upstream git)
-rw-r--r-- | meta/packages/mtd/mtd-utils/fix-new-glibc.patch | 64 | ||||
-rw-r--r-- | meta/packages/mtd/mtd-utils_1.0.0+git.bb | 5 |
2 files changed, 67 insertions, 2 deletions
diff --git a/meta/packages/mtd/mtd-utils/fix-new-glibc.patch b/meta/packages/mtd/mtd-utils/fix-new-glibc.patch new file mode 100644 index 0000000000..dd78b80c7c --- /dev/null +++ b/meta/packages/mtd/mtd-utils/fix-new-glibc.patch | |||
@@ -0,0 +1,64 @@ | |||
1 | commit e6088d987c545d60a86e1f44836ab8ba072fffd9 | ||
2 | Author: David Woodhouse <dwmw2@infradead.org> | ||
3 | Date: Sat Feb 23 22:28:36 2008 +0900 | ||
4 | |||
5 | Fix recv_image compilation with new glibc | ||
6 | |||
7 | struct ip_mreq is hidden behind __USE_MISC now | ||
8 | |||
9 | diff --git a/recv_image.c b/recv_image.c | ||
10 | index 028635a..3b79304 100644 | ||
11 | --- a/recv_image.c | ||
12 | +++ b/recv_image.c | ||
13 | @@ -1,5 +1,6 @@ | ||
14 | |||
15 | #define _XOPEN_SOURCE 500 | ||
16 | +#define _USE_MISC | ||
17 | |||
18 | #include <errno.h> | ||
19 | #include <error.h> | ||
20 | |||
21 | commit b995f89a81589be8d8a41c374a6df109d0ee12b3 | ||
22 | Author: David Woodhouse <dwmw2@infradead.org> | ||
23 | Date: Thu May 22 12:44:14 2008 +0100 | ||
24 | |||
25 | Fix recv_image build harder | ||
26 | |||
27 | Signed-off-by: David Woodhouse <dwmw2@infradead.org> | ||
28 | |||
29 | diff --git a/recv_image.c b/recv_image.c | ||
30 | index 3b79304..d65aa2a 100644 | ||
31 | --- a/recv_image.c | ||
32 | +++ b/recv_image.c | ||
33 | @@ -1,14 +1,14 @@ | ||
34 | |||
35 | #define _XOPEN_SOURCE 500 | ||
36 | -#define _USE_MISC | ||
37 | |||
38 | -#include <errno.h> | ||
39 | -#include <error.h> | ||
40 | -#include <netdb.h> | ||
41 | -#include <stdio.h> | ||
42 | -#include <stdlib.h> | ||
43 | +#include <errno.h> | ||
44 | +#include <error.h> | ||
45 | +#include <stdio.h> | ||
46 | +#define __USE_GNU | ||
47 | +#include <netdb.h> | ||
48 | +#include <stdlib.h> | ||
49 | #include <string.h> | ||
50 | -#include <unistd.h> | ||
51 | +#include <unistd.h> | ||
52 | #include <fcntl.h> | ||
53 | #include <sys/types.h> | ||
54 | #include <sys/stat.h> | ||
55 | @@ -307,7 +307,7 @@ int main(int argc, char **argv) | ||
56 | ~(meminfo.erasesize - 1); | ||
57 | erase.length = meminfo.erasesize; | ||
58 | |||
59 | - printf("Will erase at %08lx len %08lx (bad write was at %08lx)\n", | ||
60 | + printf("Will erase at %08x len %08x (bad write was at %08x)\n", | ||
61 | erase.start, erase.length, eraseblocks[block_nr].flash_offset); | ||
62 | if (ioctl(flfd, MEMERASE, &erase)) { | ||
63 | perror("MEMERASE"); | ||
64 | |||
diff --git a/meta/packages/mtd/mtd-utils_1.0.0+git.bb b/meta/packages/mtd/mtd-utils_1.0.0+git.bb index 81eaefad74..88831ed6eb 100644 --- a/meta/packages/mtd/mtd-utils_1.0.0+git.bb +++ b/meta/packages/mtd/mtd-utils_1.0.0+git.bb | |||
@@ -3,11 +3,12 @@ SECTION = "base" | |||
3 | DEPENDS = "zlib lzo" | 3 | DEPENDS = "zlib lzo" |
4 | HOMEPAGE = "http://www.linux-mtd.infradead.org/" | 4 | HOMEPAGE = "http://www.linux-mtd.infradead.org/" |
5 | LICENSE = "GPLv2" | 5 | LICENSE = "GPLv2" |
6 | PR = "r6" | 6 | PR = "r7" |
7 | 7 | ||
8 | SRC_URI = "git://git.infradead.org/mtd-utils.git;protocol=git;tag=2a032bca585e27ceb0f293905718b416bc297ce2 \ | 8 | SRC_URI = "git://git.infradead.org/mtd-utils.git;protocol=git;tag=2a032bca585e27ceb0f293905718b416bc297ce2 \ |
9 | file://add-exclusion-to-mkfs-jffs2-git.patch;patch=1 \ | 9 | file://add-exclusion-to-mkfs-jffs2-git.patch;patch=1 \ |
10 | file://fix-ignoreerrors-git.patch;patch=1" | 10 | file://fix-ignoreerrors-git.patch;patch=1 \ |
11 | file://fix-new-glibc.patch;patch=1" | ||
11 | 12 | ||
12 | S = "${WORKDIR}/git/" | 13 | S = "${WORKDIR}/git/" |
13 | 14 | ||