1
0
mirror of https://github.com/termux/termux-packages synced 2024-06-18 12:17:09 +00:00
termux-packages/packages/socat/no-o_append.patch
Leonid Pliushch f12df16fc8 socat: don't use O_APPEND
Now socat can open PTYs on Android 8 or newer.
2019-01-16 23:16:48 +01: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;
}