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