aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordanielk1977 <danielk1977@noemail.net>2008-09-15 04:20:31 +0000
committerdanielk1977 <danielk1977@noemail.net>2008-09-15 04:20:31 +0000
commit5ad6a88f595ed38c0ca86c3fe66e8ccff87722d6 (patch)
tree089b3f25dc65cb8fa81895f67f38a2a2b8b60331 /src
parentf018cc2ef0aff505f598406bf7a2050df2630c3a (diff)
downloadsqlite-5ad6a88f595ed38c0ca86c3fe66e8ccff87722d6.tar.gz
sqlite-5ad6a88f595ed38c0ca86c3fe66e8ccff87722d6.zip
Check if error code ENOTSUP is supported before using it. Ticket #3375. (CVS 5697)
FossilOrigin-Name: c32cb106c5d68e98f51f1eaf9ae0e2a3c36d00d6
Diffstat (limited to 'src')
-rw-r--r--src/os_unix.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index cd8cd521c..d84b90419 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -12,7 +12,7 @@
**
** This file contains code that is specific to Unix systems.
**
-** $Id: os_unix.c,v 1.200 2008/09/04 17:17:39 danielk1977 Exp $
+** $Id: os_unix.c,v 1.201 2008/09/15 04:20:32 danielk1977 Exp $
*/
#include "sqliteInt.h"
#if SQLITE_OS_UNIX /* This file is used on unix only */
@@ -1178,9 +1178,11 @@ static int sqliteErrorFromPosixError(int posixError, int sqliteIOErr) {
/* something went terribly awry, unless during file system support
* introspection, in which it actually means what it says */
#endif
+#ifdef ENOTSUP
case ENOTSUP:
/* invalid fd, unless during file system support introspection, in which
* it actually means what it says */
+#endif
case EIO:
case EBADF:
case EINVAL:
@@ -1563,7 +1565,7 @@ static int unixUnlock(sqlite3_file *id, int locktype){
pLock->locktype = NO_LOCK;
}else{
int tErrno = errno;
- rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_UNLOCK);
+ rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_UNLOCK);
if( IS_LOCK_ERROR(rc) ){
pFile->lastErrno = tErrno;
}