Bug 1964446 - Fix sqlite-vec build on Linux+musl.r=asuth,mak

see also:
https://phabricator.services.mozilla.com/D247229#8557917
https://github.com/asg017/sqlite-vec/pull/219

Differential Revision: https://phabricator.services.mozilla.com/D248399
This commit is contained in:
Patrycja Rosa
2025-05-13 14:25:43 +00:00
committed by mak77@bonardo.net
parent aa008038e2
commit 0c7e2d7473
3 changed files with 23 additions and 32 deletions

View File

@@ -1,18 +0,0 @@
--- a/sqlite-vec.c
+++ b/sqlite-vec.c
@@ -65,6 +65,7 @@
#ifndef __EMSCRIPTEN__
#ifndef __COSMOPOLITAN__
#ifndef __wasi__
+#ifndef __sun__
typedef u_int8_t uint8_t;
typedef u_int16_t uint16_t;
typedef u_int64_t uint64_t;
@@ -72,6 +73,7 @@
#endif
#endif
#endif
+#endif
typedef int8_t i8;
typedef uint8_t u8;

View File

@@ -0,0 +1,23 @@
diff --git a/sqlite-vec.c b/sqlite-vec.c
index 86378ba..e8e38c9 100644
--- a/sqlite-vec.c
+++ b/sqlite-vec.c
@@ -61,18 +61,6 @@ SQLITE_EXTENSION_INIT3
#define LONGDOUBLE_TYPE long double
#endif
-#ifndef _WIN32
-#ifndef __EMSCRIPTEN__
-#ifndef __COSMOPOLITAN__
-#ifndef __wasi__
-typedef u_int8_t uint8_t;
-typedef u_int16_t uint16_t;
-typedef u_int64_t uint64_t;
-#endif
-#endif
-#endif
-#endif
-
typedef int8_t i8;
typedef uint8_t u8;
typedef int16_t i16;

View File

@@ -61,20 +61,6 @@ SQLITE_EXTENSION_INIT3
#define LONGDOUBLE_TYPE long double
#endif
#ifndef _WIN32
#ifndef __EMSCRIPTEN__
#ifndef __COSMOPOLITAN__
#ifndef __wasi__
#ifndef __sun__
typedef u_int8_t uint8_t;
typedef u_int16_t uint16_t;
typedef u_int64_t uint64_t;
#endif
#endif
#endif
#endif
#endif
typedef int8_t i8;
typedef uint8_t u8;
typedef int16_t i16;