Package: sqlite3
Version: 3.6.13-1
Severity: important


Coin,

sqlite3 is able to choose the file locking method properly according to the system on which it runs, but unfortunately doesn't have any knowledge about the Hurd, which is treated like Linux. The attached very small patch just modify the method selection on Hurd only; you can drop it in your debian/patches directory as-is.

Without this patch, any write attempt to the db file fails, so sqlite3 is completely unsusuable. With this patch it works very well, and the test suite from libdbd-sqlite3-perl gives no error. Would you please add this patch to your next upload (and help push it upstream too) ?

Regards.

--
Marc Dequènes (Duck)
--- z/src/os_unix.c	2009-04-09 20:41:18.000000000 +0200
+++ z/src/os_unix.c	2009-05-21 01:24:01.000000000 +0200
@@ -66,7 +66,7 @@
 ** where the database is located.  
 */
 #if !defined(SQLITE_ENABLE_LOCKING_STYLE)
-#  if defined(__APPLE__)
+#  if defined(__APPLE__) || defined(__GNU__)
 #    define SQLITE_ENABLE_LOCKING_STYLE 1
 #  else
 #    define SQLITE_ENABLE_LOCKING_STYLE 0
@@ -130,7 +130,9 @@
 # else
 #  include <sys/file.h>
 #  include <sys/param.h>
-#  include <sys/mount.h>
+#   if ! defined(__GNU__)
+#    include <sys/mount.h>
+#   endif
 # endif
 #endif /* SQLITE_ENABLE_LOCKING_STYLE */
 
@@ -5101,6 +5103,8 @@
   static sqlite3_vfs aVfs[] = {
 #if SQLITE_ENABLE_LOCKING_STYLE && (OS_VXWORKS || defined(__APPLE__))
     UNIXVFS("unix",          autolockIoFinder ),
+#elif SQLITE_ENABLE_LOCKING_STYLE && defined(__GNU__)
+    UNIXVFS("unix",          flockIoFinder ),
 #else
     UNIXVFS("unix",          posixIoFinder ),
 #endif

Attachment: pgpIie1kVedMo.pgp
Description: PGP Digital Signature

Reply via email to