summaryrefslogtreecommitdiffhomepage
path: root/patches/coreutils-9.0.local.patch
blob: 1b36cf2b8648c8446d3886a08cf4645fc2734eb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
diff --git a/src/chmod.c b/src/chmod.c
index 37b04f500..57ac47f33 100644
--- a/src/chmod.c
+++ b/src/chmod.c
@@ -44,8 +44,8 @@ struct change_status
   enum
     {
       CH_NO_STAT,
-      CH_NOT_APPLIED,
       CH_FAILED,
+      CH_NOT_APPLIED,
       CH_NO_CHANGE_REQUESTED,
       CH_SUCCEEDED
     }
@@ -322,7 +322,7 @@ process_file (FTS *fts, FTSENT *ent)
   if ( ! recurse)
     fts_set (fts, ent, FTS_SKIP);
 
-  return CH_NO_CHANGE_REQUESTED <= ch.status;
+  return CH_NOT_APPLIED <= ch.status;
 }
 
 /* Recursively change the modes of the specified FILES (the last entry
diff -ru coreutils-9.0.orig/lib/lchmod.c coreutils-9.0/lib/lchmod.c
--- coreutils-9.0.orig/lib/lchmod.c     2021-09-24 13:32:44.000000000 +0200
+++ coreutils-9.0/lib/lchmod.c  2021-09-28 21:21:23.721953133 +0200
@@ -76,7 +76,7 @@
       return -1;
     }

-# if defined __linux__ || defined __ANDROID__ || defined __CYGWIN__
+# if defined __linux__ || defined __ANDROID__ || defined __CYGWIN__ || defined __midipix__
   static char const fmt[] = "/proc/self/fd/%d";
   char buf[sizeof fmt - sizeof "%d" + INT_BUFSIZE_BOUND (int)];
   sprintf (buf, fmt, fd);
diff -ru coreutils-9.0.orig/src/ls.c coreutils-9.0/src/ls.c
--- coreutils-9.0.orig/src/ls.c 2021-09-24 13:31:05.000000000 +0200
+++ coreutils-9.0/src/ls.c      2021-09-28 19:14:34.301611763 +0200
@@ -2273,18 +2273,14 @@
       if (linelen < 0)
         {
           /* Suppress bogus warning re comparing ws.ws_col to big integer.  */
-# if __GNUC_PREREQ (4, 6)
 #  pragma GCC diagnostic push
 #  pragma GCC diagnostic ignored "-Wtype-limits"
-# endif
           struct winsize ws;
           if (stdout_isatty ()
               && 0 <= ioctl (STDOUT_FILENO, TIOCGWINSZ, &ws)
               && 0 < ws.ws_col)
             linelen = ws.ws_col <= MIN (PTRDIFF_MAX, SIZE_MAX) ? ws.ws_col : 0;
-# if __GNUC_PREREQ (4, 6)
 #  pragma GCC diagnostic pop
-# endif
         }
 #endif
       if (linelen < 0)
diff -ru coreutils-8.27.orig/configure coreutils-8.27/configure
--- coreutils-8.27.orig/configure	2017-03-09 06:00:50.000000000 +0100
+++ coreutils-8.27/configure	2017-08-11 19:04:46.135115372 +0200
@@ -68318,3 +68318,12 @@
 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
 fi
 
+# bypass dependency on help2man
+if [ x"$cross_compiling" = xyes ]; then
+	mkdir -p man;
+	for f in $srcdir/src/*.c; do src=$(basename $f); doc="${src%.*}"; echo $doc; touch man/$doc.1; done
+	for f in dir sha1sum sha224sum sha256sum sha384sum sha512sum vdir; do touch man/$f.1; done
+
+	sed -i -e 's/@cross_compiling@/'$cross_compiling'/g' Makefile || exit 2
+fi
+
diff -ru coreutils-8.27.orig/Makefile.in coreutils-8.27/Makefile.in
--- coreutils-8.27.orig/Makefile.in	2017-03-09 06:24:51.000000000 +0100
+++ coreutils-8.27/Makefile.in	2017-08-11 19:09:39.000000000 +0200
@@ -3454,7 +3454,7 @@
 INET_PTON_LIB = @INET_PTON_LIB@
 INSTALL = $(cu_install_program) -c
 INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_PROGRAM = install
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
 INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@
@@ -5040,12 +5040,14 @@
     $(bin_SCRIPTS) \
     $(EXTRA_PROGRAMS)
 
+CROSS_COMPILE = @cross_compiling@
+
 pm = progs-makefile
 pr = progs-readme
 @CROSS_COMPILING_FALSE@cu_install_program = src/ginstall
 
 # Use the just-built 'ginstall', when not cross-compiling.
-@CROSS_COMPILING_TRUE@cu_install_program = @INSTALL@
+@CROSS_COMPILING_TRUE@cu_install_program = install
 info_TEXINFOS = doc/coreutils.texi
 doc_coreutils_TEXINFOS = \
   doc/perm.texi \
diff -ru coreutils-8.31.orig/src/fs.h coreutils-8.31/src/fs.h
--- coreutils-8.31.orig/src/fs.h        2019-03-06 19:53:32.000000000 +0100
+++ coreutils-8.31/src/fs.h     2019-10-18 08:55:31.598366616 +0200
@@ -2,7 +2,7 @@
    Please send additions to bug-coreutils@gnu.org and meskes@debian.org.
    This file is generated automatically from ./src/stat.c. */

-#if defined __linux__ || defined __ANDROID__
+#if defined __linux__ || defined __ANDROID__ || defined(__midipix__)
 # define S_MAGIC_AAFS 0x5A3C69F0
 # define S_MAGIC_ACFS 0x61636673
 # define S_MAGIC_ADFS 0xADF5