mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
106 lines
3.7 KiB
Diff
106 lines
3.7 KiB
Diff
From 878ac385d867c008cca292ed11e073e72ce38ccb Mon Sep 17 00:00:00 2001
|
|
From: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
Date: Wed, 15 May 2019 17:26:29 -0600
|
|
Subject: [PATCH] 32-bit compat
|
|
|
|
---
|
|
utils/nfsdcld/sqlite.c | 20 ++++++++++----------
|
|
1 file changed, 10 insertions(+), 10 deletions(-)
|
|
|
|
diff --git a/utils/nfsdcld/sqlite.c b/utils/nfsdcld/sqlite.c
|
|
index faa62f94..8563fbe9 100644
|
|
--- a/utils/nfsdcld/sqlite.c
|
|
+++ b/utils/nfsdcld/sqlite.c
|
|
@@ -535,7 +535,7 @@ sqlite_copy_cltrack_records(int *num_rec)
|
|
xlog(L_ERROR, "Unable to begin transaction: %s", err);
|
|
goto rollback;
|
|
}
|
|
- ret = snprintf(buf, sizeof(buf), "DELETE FROM \"rec-%016lx\";",
|
|
+ ret = snprintf(buf, sizeof(buf), "DELETE FROM \"rec-%016llx\";",
|
|
current_epoch);
|
|
if (ret < 0) {
|
|
xlog(L_ERROR, "sprintf failed!");
|
|
@@ -550,7 +550,7 @@ sqlite_copy_cltrack_records(int *num_rec)
|
|
xlog(L_ERROR, "Unable to clear records from current epoch: %s", err);
|
|
goto rollback;
|
|
}
|
|
- ret = snprintf(buf, sizeof(buf), "INSERT INTO \"rec-%016lx\" "
|
|
+ ret = snprintf(buf, sizeof(buf), "INSERT INTO \"rec-%016llx\" "
|
|
"SELECT id FROM attached.clients;",
|
|
current_epoch);
|
|
if (ret < 0) {
|
|
@@ -703,7 +703,7 @@ sqlite_insert_client(const unsigned char *clname, const size_t namelen)
|
|
int ret;
|
|
sqlite3_stmt *stmt = NULL;
|
|
|
|
- ret = snprintf(buf, sizeof(buf), "INSERT OR REPLACE INTO \"rec-%016lx\" "
|
|
+ ret = snprintf(buf, sizeof(buf), "INSERT OR REPLACE INTO \"rec-%016llx\" "
|
|
"VALUES (?);", current_epoch);
|
|
if (ret < 0) {
|
|
xlog(L_ERROR, "sprintf failed!");
|
|
@@ -748,7 +748,7 @@ sqlite_remove_client(const unsigned char *clname, const size_t namelen)
|
|
int ret;
|
|
sqlite3_stmt *stmt = NULL;
|
|
|
|
- ret = snprintf(buf, sizeof(buf), "DELETE FROM \"rec-%016lx\" "
|
|
+ ret = snprintf(buf, sizeof(buf), "DELETE FROM \"rec-%016llx\" "
|
|
"WHERE id==?;", current_epoch);
|
|
if (ret < 0) {
|
|
xlog(L_ERROR, "sprintf failed!");
|
|
@@ -798,7 +798,7 @@ sqlite_check_client(const unsigned char *clname, const size_t namelen)
|
|
int ret;
|
|
sqlite3_stmt *stmt = NULL;
|
|
|
|
- ret = snprintf(buf, sizeof(buf), "SELECT count(*) FROM \"rec-%016lx\" "
|
|
+ ret = snprintf(buf, sizeof(buf), "SELECT count(*) FROM \"rec-%016llx\" "
|
|
"WHERE id==?;", recovery_epoch);
|
|
if (ret < 0) {
|
|
xlog(L_ERROR, "sprintf failed!");
|
|
@@ -873,7 +873,7 @@ sqlite_grace_start(void)
|
|
tcur++;
|
|
|
|
ret = snprintf(buf, sizeof(buf), "UPDATE grace "
|
|
- "SET current = %ld, recovery = %ld;",
|
|
+ "SET current = %lld, recovery = %lld;",
|
|
(int64_t)tcur, (int64_t)trec);
|
|
if (ret < 0) {
|
|
xlog(L_ERROR, "sprintf failed!");
|
|
@@ -891,7 +891,7 @@ sqlite_grace_start(void)
|
|
goto rollback;
|
|
}
|
|
|
|
- ret = snprintf(buf, sizeof(buf), "CREATE TABLE \"rec-%016lx\" "
|
|
+ ret = snprintf(buf, sizeof(buf), "CREATE TABLE \"rec-%016llx\" "
|
|
"(id BLOB PRIMARY KEY);",
|
|
tcur);
|
|
if (ret < 0) {
|
|
@@ -915,7 +915,7 @@ sqlite_grace_start(void)
|
|
* values in the grace table, just clear out the records for
|
|
* the current reboot epoch.
|
|
*/
|
|
- ret = snprintf(buf, sizeof(buf), "DELETE FROM \"rec-%016lx\";",
|
|
+ ret = snprintf(buf, sizeof(buf), "DELETE FROM \"rec-%016llx\";",
|
|
tcur);
|
|
if (ret < 0) {
|
|
xlog(L_ERROR, "sprintf failed!");
|
|
@@ -976,7 +976,7 @@ sqlite_grace_done(void)
|
|
goto rollback;
|
|
}
|
|
|
|
- ret = snprintf(buf, sizeof(buf), "DROP TABLE \"rec-%016lx\";",
|
|
+ ret = snprintf(buf, sizeof(buf), "DROP TABLE \"rec-%016llx\";",
|
|
recovery_epoch);
|
|
if (ret < 0) {
|
|
xlog(L_ERROR, "sprintf failed!");
|
|
@@ -1027,7 +1027,7 @@ sqlite_iterate_recovery(int (*cb)(struct cld_client *clnt), struct cld_client *c
|
|
return -EINVAL;
|
|
}
|
|
|
|
- ret = snprintf(buf, sizeof(buf), "SELECT * FROM \"rec-%016lx\";",
|
|
+ ret = snprintf(buf, sizeof(buf), "SELECT * FROM \"rec-%016llx\";",
|
|
recovery_epoch);
|
|
if (ret < 0) {
|
|
xlog(L_ERROR, "sprintf failed!");
|
|
--
|
|
2.21.0
|
|
|