From 9eaff32f986fd54e4c3721f529282a3b7beb7302 Mon Sep 17 00:00:00 2001 From: Tomas-Uribe <22968303+TomasUribe@users.noreply.github.com> Date: Tue, 3 Nov 2026 11:37:00 -0500 Subject: [PATCH] Switch: regenerate the sqlite3 patch (hunk headers were malformed, so it never applied) Co-Authored-By: Claude Opus 5.5 --- .../sqlite3-nintendo-switch-platform.patch | 42 +++++++++---------- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/aurora-main/cmake/patches/sqlite3-nintendo-switch-platform.patch b/aurora-main/cmake/patches/sqlite3-nintendo-switch-platform.patch index 944af07..b5faaff 100644 --- a/aurora-main/cmake/patches/sqlite3-nintendo-switch-platform.patch +++ b/aurora-main/cmake/patches/sqlite3-nintendo-switch-platform.patch @@ -1,6 +1,6 @@ --- a/sqlite3.c +++ b/sqlite3.c -@@ -173,6 +173,13 @@ +@@ -176,6 +176,13 @@ #define HAVE_FCHOWN 1 #define HAVE_READLINK 1 #define HAVE_LSTAT 1 @@ -12,27 +12,9 @@ +#undef HAVE_FCHOWN +#endif #endif /* defined(_WRS_KERNEL) */ ---- a/sqlite3.c -+++ b/sqlite3.c -@@ -46226,6 +46226,15 @@ - path.nSymlink = 0; - path.nOut = nOut; - path.zOut = zOut; -+#if defined(__SWITCH__) -+ /* libnx paths name their device ("sdmc:/dir/file"): already absolute, and rebuilding them -+ ** element-by-element below would prefix a '/' (or the cwd) and break the device lookup. */ -+ if( strchr(zPath, ':')!=0 ){ -+ if( (int)strlen(zPath)+1>nOut ) return SQLITE_CANTOPEN_BKPT; -+ memcpy(zOut, zPath, strlen(zPath)+1); -+ return SQLITE_OK; -+ } -+#endif - if( zPath[0]!='/' ){ - char zPwd[SQLITE_MAX_PATHLEN+2]; - if( osGetcwd(zPwd, sizeof(zPwd)-2)==0 ){ ---- a/sqlite3.c -+++ b/sqlite3.c -@@ -42694,6 +42694,15 @@ + + /************** End of vxworks.h *********************************************/ +@@ -42687,6 +42694,15 @@ got = osRead(id->h, pBuf, cnt); #endif if( got==cnt ) break; @@ -48,3 +30,19 @@ if( got<0 ){ if( errno==EINTR ){ got = 1; continue; } prior = 0; +@@ -46219,6 +46235,15 @@ + path.nSymlink = 0; + path.nOut = nOut; + path.zOut = zOut; ++#if defined(__SWITCH__) ++ /* libnx paths name their device ("sdmc:/dir/file"): already absolute, and rebuilding them ++ ** element-by-element below would prefix a '/' (or the cwd) and break the device lookup. */ ++ if( strchr(zPath, ':')!=0 ){ ++ if( (int)strlen(zPath)+1>nOut ) return SQLITE_CANTOPEN_BKPT; ++ memcpy(zOut, zPath, strlen(zPath)+1); ++ return SQLITE_OK; ++ } ++#endif + if( zPath[0]!='/' ){ + char zPwd[SQLITE_MAX_PATHLEN+2]; + if( osGetcwd(zPwd, sizeof(zPwd)-2)==0 ){