From fdaa4c4195d06e81863db07cf0dfcdfc4fa472d3 Mon Sep 17 00:00:00 2001 From: Denis 'GNUtoo' Carikli Date: Fri, 5 Mar 2021 12:10:37 +0100 Subject: Add support for Android Copying the The config.h from config.h.in didn't work and resulted in errors like that: external/wipe/dir.c: In function 'drill_down': external/wipe/dir.c:92:17: warning: assignment from incompatible pointer type while ((entry = readdir(dir)) != NULL) ^ external/wipe/dir.c:94:24: error: dereferencing pointer to incomplete type if (strncmp(entry->d_name, ".", 2) && strncmp(entry->d_name, "..", 3) != 0) ^ external/wipe/dir.c:94:58: error: dereferencing pointer to incomplete type if (strncmp(entry->d_name, ".", 2) && strncmp(entry->d_name, "..", 3) != 0) ^ external/wipe/dir.c:95:15: error: dereferencing pointer to incomplete type do_file(entry->d_name); /*** process file ***/ ^ external/wipe/dir.c: In function 'dir_sync': external/wipe/dir.c:299:36: warning: unused parameter 'name' [-Wunused-parameter] private int dir_sync(int ffd, char name[]) ^ So it was generated on Parabola i686 by running ./configure. Removing the errno declaration was also needed to make it compile as otherwise we end up with errors like this one: In file included from external/wipe/blkdev.c:27:0: external/wipe/blkdev.c:66:12: error: conflicting types for '__errno' extern int errno; ^ bionic/libc/include/errno.h:44:22: note: previous declaration of '__errno' was here extern volatile int* __errno(void) __pure2; ^ Signed-off-by: Denis 'GNUtoo' Carikli --- blkdev.c | 1 - 1 file changed, 1 deletion(-) (limited to 'blkdev.c') diff --git a/blkdev.c b/blkdev.c index 680392e..165a91f 100644 --- a/blkdev.c +++ b/blkdev.c @@ -63,7 +63,6 @@ #include "wipe.h" #include "blkdev.h" -extern int errno; extern int exit_code; extern char *argvzero; extern struct opt_s options; -- cgit v1.2.3