termux-packages/packages/coreutils/shred.c.patch

22 lines
669 B
Diff

diff -u -r ../coreutils-8.23/src/shred.c ./src/shred.c
--- ../coreutils-8.23/src/shred.c 2014-07-11 13:00:07.000000000 +0200
+++ ./src/shred.c 2014-07-29 15:26:23.000000000 +0200
@@ -80,7 +80,7 @@
#include <assert.h>
#include <setjmp.h>
#include <sys/types.h>
-#ifdef __linux__
+#if defined(__linux__) && !defined(__ANDROID__)
# include <sys/mtio.h>
#endif
@@ -388,7 +388,7 @@
{
if (S_ISCHR (st->st_mode))
{
-#ifdef __linux__
+#if defined(__linux__) && !defined(__ANDROID__)
/* In the Linux kernel, lseek does not work on tape devices; it
returns a randomish value instead. Try the low-level tape
rewind operation first. */