diff --git a/c-programming/reverse-ramdisk.c b/c-programming/reverse-ramdisk.c index 5535c38..72f081c 100644 --- a/c-programming/reverse-ramdisk.c +++ b/c-programming/reverse-ramdisk.c @@ -191,9 +191,15 @@ int tf_write(int ID, size_t offset, void* src, size_t data_size) { // Write the data to the file #if IS_POSIX - ssize_t bytes_written = write(file, src, data_size); + ssize_t #else - size_t bytes_written = fwrite(src, 1, data_size, file); + size_t +#endif + bytes_written = +#if IS_POSIX + write(file, src, data_size); +#else + fwrite(src, 1, data_size, file); #endif if (