From a24048fc05b5cecb931b23fdcf62da6f6eb9f25d Mon Sep 17 00:00:00 2001 From: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com> Date: Mon, 3 Feb 2025 12:13:51 +0000 Subject: bumps our fork of modernc.org/sqlite to v1.34.5 (#3731) --- vendor/modernc.org/sqlite/lib/hooks.go | 6 +++++ vendor/modernc.org/sqlite/lib/hooks_linux_arm64.go | 30 ++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 vendor/modernc.org/sqlite/lib/hooks_linux_arm64.go (limited to 'vendor/modernc.org/sqlite/lib') diff --git a/vendor/modernc.org/sqlite/lib/hooks.go b/vendor/modernc.org/sqlite/lib/hooks.go index 9bedb87ac..4bd919b89 100644 --- a/vendor/modernc.org/sqlite/lib/hooks.go +++ b/vendor/modernc.org/sqlite/lib/hooks.go @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. +//go:build !(linux && arm64) + package sqlite3 import ( @@ -12,3 +14,7 @@ import ( func X__ccgo_sqlite3_log(t *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { /* sqlite3.c:29405:17: */ libc.X__ccgo_sqlite3_log(t, iErrCode, zFormat, va) } + +func PatchIssue199() { + // nop +} diff --git a/vendor/modernc.org/sqlite/lib/hooks_linux_arm64.go b/vendor/modernc.org/sqlite/lib/hooks_linux_arm64.go new file mode 100644 index 000000000..be3873bf9 --- /dev/null +++ b/vendor/modernc.org/sqlite/lib/hooks_linux_arm64.go @@ -0,0 +1,30 @@ +// Copyright 2019 The Sqlite Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package sqlite3 + +import ( + "syscall" + "unsafe" + + "modernc.org/libc" +) + +// Format and write a message to the log if logging is enabled. +func X__ccgo_sqlite3_log(t *libc.TLS, iErrCode int32, zFormat uintptr, va uintptr) { /* sqlite3.c:29405:17: */ + libc.X__ccgo_sqlite3_log(t, iErrCode, zFormat, va) +} + +// https://gitlab.com/cznic/sqlite/-/issues/199 +// +// We are currently stuck on libc@v1.55.3. Until that is resolved - fix the +// problem at runtime. +func PatchIssue199() { + p := unsafe.Pointer(&_aSyscall) + *(*uintptr)(unsafe.Add(p, 608)) = __ccgo_fp(_unixGetpagesizeIssue199) +} + +func _unixGetpagesizeIssue199(tls *libc.TLS) (r int32) { + return int32(syscall.Getpagesize()) +} -- cgit v1.2.3