/* ISC license. */ #include /* lol MacOS */ #include #include #include int fd_sync (int fd) { int r ; do r = fsync(fd) ; while (r == -1 && errno == EINTR) ; return r ; }