diff options
-rw-r--r-- | tests/shm.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/shm.c b/tests/shm.c index a0cf67e..26c5160 100644 --- a/tests/shm.c +++ b/tests/shm.c @@ -87,6 +87,12 @@ test_flag_nonexistent (void) dconf_shm_flag ("does-not-exist"); } +#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 +#define PWRITE_SYM "pwrite64" +#else +#define PWRITE_SYM "pwrite" +#endif + static gboolean should_fail_pwrite; /* interpose */ ssize_t @@ -95,7 +101,7 @@ pwrite (int fd, const void *buf, size_t count, off_t offset) static ssize_t (* real_pwrite) (int, const void *, size_t, off_t); if (!real_pwrite) - real_pwrite = dlsym (RTLD_NEXT, "pwrite"); + real_pwrite = dlsym (RTLD_NEXT, PWRITE_SYM); if (should_fail_pwrite) { |