Use off_t instead of loff_t
authorCismonX <admin@cismon.net>
Thu, 20 Jun 2024 20:40:51 +0000 (04:40 +0800)
committerBernd Schubert <bernd.schubert@fastmail.fm>
Tue, 25 Jun 2024 05:16:49 +0000 (07:16 +0200)
Since we're already enforcing 64-bit off_t, using loff_t
makes no difference.

Also loff_t is Linux-only, which breaks compatibility for *BSD.

test/test_write_cache.c

index 6b12a9dbd68401df866da40835ee7a24059efb4a..cc827c7f35bbc8877317320e740b8649094e7fda 100644 (file)
@@ -9,8 +9,6 @@
 
 #define FUSE_USE_VERSION 30
 
-#define _GNU_SOURCE /* for loff_t */
-
 #include <fuse_config.h>
 #include <fuse_lowlevel.h>
 #include <stdio.h>
@@ -214,7 +212,7 @@ static void test_fs(char *mountpoint) {
     const size_t dsize = options.data_size * WRITE_SYSCALLS;
     int fd, rofd;
     pthread_t rofd_thread;
-    loff_t off = 0;
+    off_t off = 0;
 
     buf = malloc(dsize);
     assert(buf != NULL);