0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-12-12 00:10:52 +00:00
termux-packages/packages/socat/0003-no-o_append.patch
2023-12-09 13:46:43 +08:00

18 lines
475 B
Diff

diff -uNr socat-1.7.3.2/xio-gopen.c socat-1.7.3.2.mod/xio-gopen.c
--- socat-1.7.3.2/xio-gopen.c 2017-01-06 23:51:24.000000000 +0200
+++ socat-1.7.3.2.mod/xio-gopen.c 2018-12-31 14:22:34.046949870 +0200
@@ -33,12 +33,7 @@
}
st_mode = result;
- if (exists) {
- /* file (or at least named entry) exists */
- if ((xioflags&XIO_ACCMODE) != XIO_RDONLY) {
- openflags |= O_APPEND;
- }
- } else {
+ if (!exists) {
openflags |= O_CREAT;
}