summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <marcin@buglabs.net>2009-02-26 15:13:46 (GMT)
committerMarcin Juszkiewicz <marcin@buglabs.net>2009-02-26 15:13:46 (GMT)
commit7fe3c30100a1788605b4dd407b713ab7da463e41 (patch)
tree7adc10f7b1efcdd51d80a4f217d4a98df66cd899
parent1bcb06beeeb62a0fc88c0c9f1cc1e77fa8b17389 (diff)
downloadpoky-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.patch64
-rw-r--r--meta/packages/mtd/mtd-utils_1.0.0+git.bb5
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 0000000..dd78b80
--- /dev/null
+++ b/meta/packages/mtd/mtd-utils/fix-new-glibc.patch
@@ -0,0 +1,64 @@
1commit e6088d987c545d60a86e1f44836ab8ba072fffd9
2Author: David Woodhouse <dwmw2@infradead.org>
3Date: 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
9diff --git a/recv_image.c b/recv_image.c
10index 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
21commit b995f89a81589be8d8a41c374a6df109d0ee12b3
22Author: David Woodhouse <dwmw2@infradead.org>
23Date: 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
29diff --git a/recv_image.c b/recv_image.c
30index 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 81eaefa..88831ed 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"
3DEPENDS = "zlib lzo" 3DEPENDS = "zlib lzo"
4HOMEPAGE = "http://www.linux-mtd.infradead.org/" 4HOMEPAGE = "http://www.linux-mtd.infradead.org/"
5LICENSE = "GPLv2" 5LICENSE = "GPLv2"
6PR = "r6" 6PR = "r7"
7 7
8SRC_URI = "git://git.infradead.org/mtd-utils.git;protocol=git;tag=2a032bca585e27ceb0f293905718b416bc297ce2 \ 8SRC_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
12S = "${WORKDIR}/git/" 13S = "${WORKDIR}/git/"
13 14