darwin.libiconv: update patch for static build; curl: don’t skip passthru.tests.static
on x86_64-darwin
(#348023)
This commit is contained in:
commit
96fbd2f5f3
@ -1,17 +1,17 @@
|
|||||||
From a3e945c630180e9aa182603207238302e58fe8fe Mon Sep 17 00:00:00 2001
|
From cf3bcbf4444d73cb3d1a9369c569338ae0fcb668 Mon Sep 17 00:00:00 2001
|
||||||
From: Randy Eckenrode <randy@largeandhighquality.com>
|
From: Randy Eckenrode <randy@largeandhighquality.com>
|
||||||
Date: Sat, 25 May 2024 19:03:58 -0400
|
Date: Sat, 25 May 2024 19:03:58 -0400
|
||||||
Subject: [PATCH 1/2] Support static module loading
|
Subject: [PATCH 1/2] Support static module loading
|
||||||
|
|
||||||
---
|
---
|
||||||
citrus/citrus_module.c | 21 ++++++++++++++++++---
|
citrus/citrus_module.c | 20 ++++++++++++++++++--
|
||||||
1 file changed, 18 insertions(+), 3 deletions(-)
|
1 file changed, 18 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
diff --git a/citrus/citrus_module.c b/citrus/citrus_module.c
|
diff --git a/citrus/citrus_module.c b/citrus/citrus_module.c
|
||||||
index 5103d30..c22c9da 100644
|
index 8ca4702..7667868 100644
|
||||||
--- a/citrus/citrus_module.c
|
--- a/citrus/citrus_module.c
|
||||||
+++ b/citrus/citrus_module.c
|
+++ b/citrus/citrus_module.c
|
||||||
@@ -324,22 +324,36 @@ out:
|
@@ -324,16 +324,24 @@ out:
|
||||||
return (path[0] ? path : NULL);
|
return (path[0] ? path : NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,9 +37,10 @@ index 5103d30..c22c9da 100644
|
|||||||
return (p);
|
return (p);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
@@ -345,6 +353,12 @@ _citrus_load_module(_citrus_module_t *rhandle, const char *encname)
|
||||||
_citrus_load_module(_citrus_module_t *rhandle, const char *encname)
|
return (0);
|
||||||
{
|
#else
|
||||||
|
|
||||||
+#if defined(ENABLE_STATIC)
|
+#if defined(ENABLE_STATIC)
|
||||||
+ if (is_known_encoding(encname, strnlen(encname, MAX_WORD_LENGTH)) > MAX_HASH_VALUE) {
|
+ if (is_known_encoding(encname, strnlen(encname, MAX_WORD_LENGTH)) > MAX_HASH_VALUE) {
|
||||||
+ return (EINVAL);
|
+ return (EINVAL);
|
||||||
@ -49,24 +50,24 @@ index 5103d30..c22c9da 100644
|
|||||||
const char *p;
|
const char *p;
|
||||||
char path[PATH_MAX];
|
char path[PATH_MAX];
|
||||||
void *handle;
|
void *handle;
|
||||||
@@ -368,14 +382,15 @@ _citrus_load_module(_citrus_module_t *rhandle, const char *encname)
|
@@ -373,7 +387,7 @@ _citrus_load_module(_citrus_module_t *rhandle, const char *encname)
|
||||||
}
|
}
|
||||||
|
|
||||||
*rhandle = (_citrus_module_t)handle;
|
*rhandle = (_citrus_module_t)handle;
|
||||||
-
|
-
|
||||||
+#endif
|
+#endif
|
||||||
return (0);
|
return (0);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
@@ -390,6 +404,8 @@ _citrus_unload_module(_citrus_module_t handle)
|
||||||
void
|
assert(handle != RTLD_SELF);
|
||||||
_citrus_unload_module(_citrus_module_t handle)
|
#endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
|
||||||
{
|
#endif /* __APPLE__ */
|
||||||
-
|
|
||||||
+#if !defined(ENABLE_STATIC)
|
+#if !defined(ENABLE_STATIC)
|
||||||
if (handle)
|
if (handle)
|
||||||
dlclose((void *)handle);
|
dlclose((void *)handle);
|
||||||
+#endif
|
+#endif
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
2.44.1
|
2.46.0
|
||||||
|
|
||||||
|
@ -210,7 +210,6 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
# nginx-http3 = useThisCurl nixosTests.nginx-http3;
|
# nginx-http3 = useThisCurl nixosTests.nginx-http3;
|
||||||
nginx-http3 = nixosTests.nginx-http3;
|
nginx-http3 = nixosTests.nginx-http3;
|
||||||
pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
|
||||||
} // lib.optionalAttrs (stdenv.hostPlatform.system != "x86_64-darwin") {
|
|
||||||
static = pkgsStatic.curl;
|
static = pkgsStatic.curl;
|
||||||
} // lib.optionalAttrs (!stdenv.hostPlatform.isDarwin) {
|
} // lib.optionalAttrs (!stdenv.hostPlatform.isDarwin) {
|
||||||
fetchpatch = tests.fetchpatch.simple.override { fetchpatch = (fetchpatch.override { fetchurl = useThisCurl fetchurl; }) // { version = 1; }; };
|
fetchpatch = tests.fetchpatch.simple.override { fetchpatch = (fetchpatch.override { fetchurl = useThisCurl fetchurl; }) // { version = 1; }; };
|
||||||
|
Loading…
Reference in New Issue
Block a user