coreutils: update to 9.4
patches were copied from CygWin.
This commit is contained in:
18
coreutils/coreutils-8.32-lib-freopen.c.patch
Normal file
18
coreutils/coreutils-8.32-lib-freopen.c.patch
Normal file
@@ -0,0 +1,18 @@
|
||||
--- origsrc/lib/freopen.c 2020-01-01 07:14:23.000000000 -0700
|
||||
+++ src/lib/freopen.c 2022-04-16 22:41:38.090786400 -0600
|
||||
@@ -59,6 +59,15 @@ rpl_freopen (const char *filename, const
|
||||
errno = 0;
|
||||
#endif
|
||||
|
||||
+#if __CYGWIN__
|
||||
+ if (!filename && !strcmp (mode, "wb"))
|
||||
+ {
|
||||
+ int flag = fcntl (fileno (stream), F_GETFL);
|
||||
+ if (0 <= flag && (flag & O_APPEND))
|
||||
+ mode = "ab";
|
||||
+ }
|
||||
+
|
||||
+#endif
|
||||
result = orig_freopen (filename, mode, stream);
|
||||
|
||||
if (!result)
|
||||
Reference in New Issue
Block a user