diff options
author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2021-03-05 12:10:37 +0100 |
---|---|---|
committer | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2021-03-06 21:21:59 +0100 |
commit | fdaa4c4195d06e81863db07cf0dfcdfc4fa472d3 (patch) | |
tree | 1917fa591d68f58d25d727a7d01548a26a885c39 | |
parent | 65eb92c9b6519c57546d93e0c83ccdbebafb632a (diff) | |
download | external_wipe-fdaa4c4195d06e81863db07cf0dfcdfc4fa472d3.tar.gz external_wipe-fdaa4c4195d06e81863db07cf0dfcdfc4fa472d3.tar.bz2 external_wipe-fdaa4c4195d06e81863db07cf0dfcdfc4fa472d3.zip |
Add support for AndroidHEADreplicant-6.0-0004-transitionreplicant-6.0-0004-rc6replicant-6.0-0004-rc5-transitionreplicant-6.0-0004-rc5replicant-6.0-0004master
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 <GNUtoo@cyberdimension.org>
-rw-r--r-- | Android.mk | 24 | ||||
-rw-r--r-- | blkdev.c | 1 | ||||
-rw-r--r-- | config.h | 146 | ||||
-rw-r--r-- | dir.c | 1 | ||||
-rw-r--r-- | file.c | 1 | ||||
-rw-r--r-- | io.c | 1 | ||||
-rw-r--r-- | main.c | 2 | ||||
-rw-r--r-- | rand.c | 2 | ||||
-rw-r--r-- | wipe.c | 1 |
9 files changed, 171 insertions, 8 deletions
diff --git a/Android.mk b/Android.mk new file mode 100644 index 0000000..3d77ec2 --- /dev/null +++ b/Android.mk @@ -0,0 +1,24 @@ +LOCAL_PATH:= $(call my-dir) + +include $(CLEAR_VARS) + +LOCAL_SRC_FILES := \ + blkdev.c \ + dir.c \ + file.c \ + io.c \ + lock.c \ + main.c \ + mt.c \ + percent.c \ + prompt.c \ + rand.c \ + str.c \ + text.c \ + wipe.c + +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE := wipe +LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES) + +include $(BUILD_EXECUTABLE) @@ -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; diff --git a/config.h b/config.h new file mode 100644 index 0000000..ea91314 --- /dev/null +++ b/config.h @@ -0,0 +1,146 @@ +/* config.h. Generated automatically by configure. */ +/* config.h.in. Generated automatically from configure.in by autoheader 2.13. */ + +/* Define to empty if the keyword does not work. */ +/* #undef const */ + +/* Define if you have a working `mmap' system call. */ +#define HAVE_MMAP 1 + +/* Define as __inline if that's what the C compiler calls it. */ +#define inline __inline__ + +/* Define to `long' if <sys/types.h> doesn't define. */ +/* #undef off_t */ + +/* Define if you need to in order for stat and other things to work. */ +/* #undef _POSIX_SOURCE */ + +/* Define to `unsigned' if <sys/types.h> doesn't define. */ +/* #undef size_t */ + +/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */ +/* #undef STAT_MACROS_BROKEN */ + +/* Define if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Define if you have the bzero function. */ +#define HAVE_BZERO 1 + +/* Define if you have the dirfd function. */ +#define HAVE_DIRFD 1 + +/* Define if you have the fchmod function. */ +#define HAVE_FCHMOD 1 + +/* Define if you have the fcntl function. */ +#define HAVE_FCNTL 1 + +/* Define if you have the fdatasync function. */ +#define HAVE_FDATASYNC 1 + +/* Define if you have the flock function. */ +#define HAVE_FLOCK 1 + +/* Define if you have the fsync function. */ +#define HAVE_FSYNC 1 + +/* Define if you have the getopt function. */ +#define HAVE_GETOPT 1 + +/* Define if you have the getpagesize function. */ +#define HAVE_GETPAGESIZE 1 + +/* Define if you have the ioctl function. */ +#define HAVE_IOCTL 1 + +/* Define if you have the lockf function. */ +#define HAVE_LOCKF 1 + +/* Define if you have the memcpy function. */ +#define HAVE_MEMCPY 1 + +/* Define if you have the memset function. */ +#define HAVE_MEMSET 1 + +/* Define if you have the realloc function. */ +#define HAVE_REALLOC 1 + +/* Define if you have the remove function. */ +#define HAVE_REMOVE 1 + +/* Define if you have the rename function. */ +#define HAVE_RENAME 1 + +/* Define if you have the rmdir function. */ +#define HAVE_RMDIR 1 + +/* Define if you have the strnlen function. */ +#define HAVE_STRNLEN 1 + +/* Define if you have the unlink function. */ +#define HAVE_UNLINK 1 + +/* Define if you have the <dirent.h> header file. */ +#define HAVE_DIRENT_H 1 + +/* Define if you have the <errno.h> header file. */ +#define HAVE_ERRNO_H 1 + +/* Define if you have the <fcntl.h> header file. */ +#define HAVE_FCNTL_H 1 + +/* Define if you have the <getopt.h> header file. */ +#define HAVE_GETOPT_H 1 + +/* Define if you have the <linux/fs.h> header file. */ +#define HAVE_LINUX_FS_H 1 + +/* Define if you have the <linux/mtio.h> header file. */ +#define HAVE_LINUX_MTIO_H 1 + +/* Define if you have the <memory.h> header file. */ +#define HAVE_MEMORY_H 1 + +/* Define if you have the <ndir.h> header file. */ +/* #undef HAVE_NDIR_H */ + +/* Define if you have the <stdint.h> header file. */ +#define HAVE_STDINT_H 1 + +/* Define if you have the <sys/dir.h> header file. */ +/* #undef HAVE_SYS_DIR_H */ + +/* Define if you have the <sys/disklabel.h> header file. */ +/* #undef HAVE_SYS_DISKLABEL_H */ + +/* Define if you have the <sys/file.h> header file. */ +#define HAVE_SYS_FILE_H 1 + +/* Define if you have the <sys/ioctl.h> header file. */ +#define HAVE_SYS_IOCTL_H 1 + +/* Define if you have the <sys/mount.h> header file. */ +#define HAVE_SYS_MOUNT_H 1 + +/* Define if you have the <sys/ndir.h> header file. */ +/* #undef HAVE_SYS_NDIR_H */ + +/* Define if you have the <sys/stat.h> header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define if you have the <sys/time.h> header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define if you have the <sys/types.h> header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define if you have the <termio.h> header file. */ +#define HAVE_TERMIO_H 1 + +/* Define if you have the <termios.h> header file. */ +#define HAVE_TERMIOS_H 1 + +/* Define if you have the <unistd.h> header file. */ +#define HAVE_UNISTD_H 1 @@ -46,7 +46,6 @@ #include "io.h" #include "dir.h" -extern int errno; extern int exit_code; extern char *argvzero; extern struct rename_s rns; @@ -43,7 +43,6 @@ #include "prompt.h" #include "wipe.h" -extern int errno; extern int exit_code; extern char *argvzero; extern struct rename_s rns; @@ -52,7 +52,6 @@ #include "main.h" #include "io.h" -extern int errno; extern int exit_code; extern char *argvzero; extern struct opt_s options; @@ -52,8 +52,6 @@ char *argvzero; int exit_code; -extern int errno; - struct opt_s options; /* cmd line options */ struct rename_s rns; struct sigaction sigact; @@ -36,7 +36,7 @@ #include "rand.h" extern char *argvzero; -extern int errno, exit_code; +extern int exit_code; extern struct opt_s options; int entropyfd; @@ -56,7 +56,6 @@ #include "rand.h" #include "wipe.h" -extern int errno; extern int exit_code; extern char *argvzero; extern struct rename_s rns; |