From 07577c5ebe1a49b5c05659559c2fd220647b33f6 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sat, 23 Jul 2016 19:33:28 +0200 Subject: tools: bring back genext2fs for apm821xx This reverts commit 8c68c104eaba65273280c7a4727fbb10ab10f5af. It is used for apm821xx, which needs ext2 (not ext4) images for some devices. Signed-off-by: Felix Fietkau --- tools/genext2fs/patches/100-c99_scanf.patch | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tools/genext2fs/patches/100-c99_scanf.patch (limited to 'tools/genext2fs/patches/100-c99_scanf.patch') diff --git a/tools/genext2fs/patches/100-c99_scanf.patch b/tools/genext2fs/patches/100-c99_scanf.patch new file mode 100644 index 0000000000..e7aa17cc6f --- /dev/null +++ b/tools/genext2fs/patches/100-c99_scanf.patch @@ -0,0 +1,21 @@ +commit 3b8ca0ce9a0b58287a780747c90c449bdebfe464 +Author: Xavier Bestel +Date: Mon Jan 14 08:52:44 2008 +0000 + + removed use of %as is scanf (GNU conflicts with C99) by Giacomo Catenazzi + +diff --git a/genext2fs.c b/genext2fs.c +index 070b270..f0d797d 100644 +--- a/genext2fs.c ++++ b/genext2fs.c +@@ -286,7 +286,9 @@ typedef unsigned int uint32; + // older solaris. Note that this is still not very portable, in that + // the return value cannot be trusted. + +-#if SCANF_CAN_MALLOC ++#if 0 // SCANF_CAN_MALLOC ++// C99 define "a" for floating point, so you can have runtime surprise ++// according the library versions + # define SCANF_PREFIX "a" + # define SCANF_STRING(s) (&s) + #else -- cgit v1.2.3