diff options
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index ea07bd99f..d6fbd8058 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -71,6 +71,19 @@ # endif #endif +/* Use pread() and pwrite() if they are available */ +#if defined(__APPLE__) +# define HAVE_PREAD 1 +# define HAVE_PWRITE 1 +#endif +#if defined(HAVE_PREAD64) && defined(HAVE_PWRITE64) +# undef USE_PREAD +# define USE_PREAD64 1 +#elif defined(HAVE_PREAD) && defined(HAVE_PWRITE) +# undef USE_PREAD64 +# define USE_PREAD 1 +#endif + /* ** standard include files. */ |