darwin.libiconv: update patch for static build; curl: don’t skip passthru.tests.static on x86_64-darwin (#348023)

This commit is contained in:
Emily 2024-10-17 14:47:30 +01:00 committed by GitHub
commit 96fbd2f5f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 16 additions and 16 deletions

View File

@ -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>
Date: Sat, 25 May 2024 19:03:58 -0400
Subject: [PATCH 1/2] Support static module loading
---
citrus/citrus_module.c | 21 ++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)
citrus/citrus_module.c | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
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
+++ b/citrus/citrus_module.c
@@ -324,22 +324,36 @@ out:
@@ -324,16 +324,24 @@ out:
return (path[0] ? path : NULL);
}
@ -37,9 +37,10 @@ index 5103d30..c22c9da 100644
return (p);
}
int
_citrus_load_module(_citrus_module_t *rhandle, const char *encname)
{
@@ -345,6 +353,12 @@ _citrus_load_module(_citrus_module_t *rhandle, const char *encname)
return (0);
#else
+#if defined(ENABLE_STATIC)
+ if (is_known_encoding(encname, strnlen(encname, MAX_WORD_LENGTH)) > MAX_HASH_VALUE) {
+ return (EINVAL);
@ -49,24 +50,24 @@ index 5103d30..c22c9da 100644
const char *p;
char path[PATH_MAX];
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;
-
+#endif
return (0);
#endif
}
void
_citrus_unload_module(_citrus_module_t handle)
{
-
@@ -390,6 +404,8 @@ _citrus_unload_module(_citrus_module_t handle)
assert(handle != RTLD_SELF);
#endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
#endif /* __APPLE__ */
+#if !defined(ENABLE_STATIC)
if (handle)
dlclose((void *)handle);
+#endif
}
--
2.44.1
2.46.0

View File

@ -210,7 +210,6 @@ stdenv.mkDerivation (finalAttrs: {
# nginx-http3 = useThisCurl nixosTests.nginx-http3;
nginx-http3 = nixosTests.nginx-http3;
pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
} // lib.optionalAttrs (stdenv.hostPlatform.system != "x86_64-darwin") {
static = pkgsStatic.curl;
} // lib.optionalAttrs (!stdenv.hostPlatform.isDarwin) {
fetchpatch = tests.fetchpatch.simple.override { fetchpatch = (fetchpatch.override { fetchurl = useThisCurl fetchurl; }) // { version = 1; }; };