aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/os_unix.c4
-rw-r--r--src/test1.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/os_unix.c b/src/os_unix.c
index 0ff696564..e4bc1dec9 100644
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -132,6 +132,10 @@
# endif
#endif /* SQLITE_ENABLE_LOCKING_STYLE */
+#if defined(__APPLE__)
+# include <sys/mount.h>
+#endif
+
/*
** Allowed values of unixFile.fsFlags
*/
diff --git a/src/test1.c b/src/test1.c
index 5a2505a72..7c5d49715 100644
--- a/src/test1.c
+++ b/src/test1.c
@@ -4909,7 +4909,7 @@ int Sqlitetest1_Init(Tcl_Interp *interp){
extern int sqlite3_open_file_count;
extern int sqlite3_sort_count;
extern int sqlite3_current_time;
-#if SQLITE_OS_UNIX && defined(__APPLE__)
+#if SQLITE_OS_UNIX && defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE
extern int sqlite3_hostid_num;
#endif
extern int sqlite3_max_blobsize;
@@ -5140,7 +5140,7 @@ int Sqlitetest1_Init(Tcl_Interp *interp){
(char*)&sqlite3_open_file_count, TCL_LINK_INT);
Tcl_LinkVar(interp, "sqlite_current_time",
(char*)&sqlite3_current_time, TCL_LINK_INT);
-#if SQLITE_OS_UNIX && defined(__APPLE__)
+#if SQLITE_OS_UNIX && defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE
Tcl_LinkVar(interp, "sqlite_hostid_num",
(char*)&sqlite3_hostid_num, TCL_LINK_INT);
#endif