diff options
author | drh <> | 2023-04-12 19:40:00 +0000 |
---|---|---|
committer | drh <> | 2023-04-12 19:40:00 +0000 |
commit | be0023fabab3080d0ba17c3a0e21c969b2dac4aa (patch) | |
tree | fca789701d01dfd4ab8052794a38e2bbf17b494f /src/os_unix.c | |
parent | 6b507423a0a67a589a85e007da1b21dfb9e2ba9b (diff) | |
download | sqlite-be0023fabab3080d0ba17c3a0e21c969b2dac4aa.tar.gz sqlite-be0023fabab3080d0ba17c3a0e21c969b2dac4aa.zip |
Automatically set HAVE_PREAD and HAVE_PWRITE on linux, as has been done in
MacOS for a long time now.
FossilOrigin-Name: 2f7a36d2c374100019bd9d38aea51ea10cfcf9b1f0330ba084a75f0773df8ebf
Diffstat (limited to 'src/os_unix.c')
-rw-r--r-- | src/os_unix.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index 6e9ee3263..d0ebb86b9 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -72,7 +72,7 @@ #endif /* Use pread() and pwrite() if they are available */ -#if defined(__APPLE__) +#if defined(__APPLE__) || defined(__linux__) # define HAVE_PREAD 1 # define HAVE_PWRITE 1 #endif @@ -3322,12 +3322,6 @@ static int nfsUnlock(sqlite3_file *id, int eFileLock){ ** Seek to the offset passed as the second argument, then read cnt ** bytes into pBuf. Return the number of bytes actually read. ** -** NB: If you define USE_PREAD or USE_PREAD64, then it might also -** be necessary to define _XOPEN_SOURCE to be 500. This varies from -** one system to another. Since SQLite does not define USE_PREAD -** in any form by default, we will not attempt to define _XOPEN_SOURCE. -** See tickets #2741 and #2681. -** ** To avoid stomping the errno value on a failed read the lastErrno value ** is set before returning. */ |