1
0
Fork 0
mirror of https://repo.or.cz/socat.git synced 2025-07-19 09:22:57 +00:00

More corrections to recent changes and from systematic tests

This commit is contained in:
Gerhard Rieger 2021-01-03 16:56:50 +01:00
parent b7a277472b
commit 45ad4018b0
13 changed files with 134 additions and 56 deletions

12
socat.c
View file

@ -187,7 +187,11 @@ int main(int argc, const char *argv[]) {
break;
}
}
if ((socat_opts.sniffleft = Open(a, O_CREAT|O_WRONLY|O_APPEND|O_LARGEFILE|O_NONBLOCK, 0664)) < 0)
if ((socat_opts.sniffleft = Open(a, O_CREAT|O_WRONLY|O_APPEND|
#ifdef O_LARGEFILE
O_LARGEFILE|
#endif
O_NONBLOCK, 0664)) < 0)
Error2("option -r \"%s\": %s", a, strerror(errno));
break;
case 'R': if (arg1[0][2]) {
@ -199,7 +203,11 @@ int main(int argc, const char *argv[]) {
break;
}
}
if ((socat_opts.sniffright = Open(a, O_CREAT|O_WRONLY|O_APPEND|O_LARGEFILE|O_NONBLOCK, 0664)) < 0)
if ((socat_opts.sniffright = Open(a, O_CREAT|O_WRONLY|O_APPEND|
#ifdef O_LARGEFILE
O_LARGEFILE|
#endif
O_NONBLOCK, 0664)) < 0)
Error2("option -r \"%s\": %s", a, strerror(errno));
break;
case 'b': if (arg1[0][2]) {