--- zzzz-none-000/linux-3.10.107/arch/um/os-Linux/file.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/arch/um/os-Linux/file.c 2021-02-04 17:41:59.000000000 +0000 @@ -13,6 +13,7 @@ #include #include #include +#include #include static void copy_stat(struct uml_stat *dst, const struct stat64 *src) @@ -237,6 +238,12 @@ { close(fd); } +int os_fsync_file(int fd) +{ + if (fsync(fd) < 0) + return -errno; + return 0; +} int os_seek_file(int fd, unsigned long long offset) { @@ -263,6 +270,15 @@ if (n < 0) return -errno; + return n; +} + +int os_sync_file(int fd) +{ + int n = fsync(fd); + + if (n < 0) + return -errno; return n; }