:: commit 593cd2ba933af0b82fad7812da5dec84245c22da

Kamila Szewczyk <kspalaiologos@gmail.com> — 2022-10-22 18:10

parents: 22c6ce4d92

more unambiguous linux handling

diff --git a/src/main.c b/src/main.c
index 5182319..18ff19f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -120,11 +120,9 @@ static void close_out_file(FILE * des) {
             exit(1);
         }
 
-        /* would have to use outfd != -1 && !FlushFileBuffers(_get_osfhandle(outfd)) and then use GetLastError + FormatMessage(A?) */
-#ifndef __MSVCRT__
+#ifdef __linux__
         while (1) {
-            int status;
-            status = fsync(outfd);
+            int status = fsync(outfd);
             if (status == -1) {
                 if (errno == EINVAL)
                     break;
tab: 248 wrap: offon