Displaying 2 results from an estimated 2 matches for "2b3503ad".
2019 Jan 23
0
[PATCH v2] fix build failure when CONFIG_KLIBC_ZLIB is not set
...1
Signed-off-by: Christophe Leroy <christophe.leroy at c-s.fr>
---
v2: defined an alternative load_ramdisk_compressed() instead of an ifdef mess.
usr/kinit/ramdisk_load.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/usr/kinit/ramdisk_load.c b/usr/kinit/ramdisk_load.c
index 2b3503ad..f43339c8 100644
--- a/usr/kinit/ramdisk_load.c
+++ b/usr/kinit/ramdisk_load.c
@@ -46,6 +46,7 @@ static int change_disk(const char *devpath, int rfd, int disk)
return open(devpath, O_RDONLY);
}
+#ifdef CONFIG_KLIBC_ZLIB
/* Also used in initrd.c */
int load_ramdisk_compressed(const char *devp...
2019 Jan 22
1
[PATCH] fix build failure when CONFIG_KLIBC_ZLIB is not set
...0,9 @@ static int rd_copy_image(const char *path)
rv = load_ramdisk_compressed(path, wfd, 0);
fclose(wfd);
} else {
+#else
+ {
+#endif
int dfd = open("/dev/ram0", O_WRONLY);
if (dfd < 0)
goto barf;
diff --git a/usr/kinit/ramdisk_load.c b/usr/kinit/ramdisk_load.c
index 2b3503ad..c30f61c2 100644
--- a/usr/kinit/ramdisk_load.c
+++ b/usr/kinit/ramdisk_load.c
@@ -13,7 +13,9 @@
#include "kinit.h"
#include "do_mounts.h"
#include "fstype.h"
+#ifdef CONFIG_KLIBC_ZLIB
#include "zlib.h"
+#endif
#define BUF_SZ 65536
@@ -46,6 +48,7 @@...