Build failure with glibc-2.43
Categories
(NSS :: Build, defect)
Tracking
(Not tracked)
People
(Reporter: rudi, Unassigned)
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.2 Safari/605.1.15
Steps to reproduce:
Patch to 3.120 to fix the error assignment discards 'const' qualifier from pointer is below
From fdf0a91b19b4cb5616c596faa372ae4365839225 Mon Sep 17 00:00:00 2001
From: Rudi Heitbaum <rudi@heitbaum.com>
Date: Sun, 25 Jan 2026 03:32:16 +0000
Subject: [PATCH] Fix build with glibc-2.43 assignment discards 'const'
qualifier from pointer
Fixes:
In file included from lowhash_vector.c:65:
genload.c: In function 'loader_LoadLibInReferenceDir':
genload.c:92:7: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
92 | c = strrchr(referencePath, PR_GetDirectorySeparator());
| ^
Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
lib/freebl/genload.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/freebl/genload.c b/lib/freebl/genload.c
index 832deb58c..e3231e3e5 100644
--- a/lib/freebl/genload.c
+++ b/lib/freebl/genload.c
@@ -85,7 +85,7 @@ loader_LoadLibInReferenceDir(const char* referencePath, const char* name)
{
PRLibrary* dlh = NULL;
char* fullName = NULL;
- char* c;
-
const char* c;
PRLibSpec libSpec;/* Remove the trailing filename from referencePath and add the new one */
--
2.51.0
Actual results:
In file included from lowhash_vector.c:65:
genload.c: In function 'loader_LoadLibInReferenceDir':
genload.c:92:7: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
92 | c = strrchr(referencePath, PR_GetDirectorySeparator());
| ^
Expected results:
Successful compile
From fdf0a91b19b4cb5616c596faa372ae4365839225 Mon Sep 17 00:00:00 2001
From: Rudi Heitbaum <rudi@heitbaum.com>
Date: Sun, 25 Jan 2026 03:32:16 +0000
Subject: [PATCH] Fix build with glibc-2.43 assignment discards 'const'
qualifier from pointer
Fixes:
In file included from lowhash_vector.c:65:
genload.c: In function 'loader_LoadLibInReferenceDir':
genload.c:92:7: error: assignment discards 'const' qualifier from pointer target type [-Werror=discarded-qualifiers]
92 | c = strrchr(referencePath, PR_GetDirectorySeparator());
| ^
Signed-off-by: Rudi Heitbaum <rudi@heitbaum.com>
---
lib/freebl/genload.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/freebl/genload.c b/lib/freebl/genload.c
index 832deb58c..e3231e3e5 100644
--- a/lib/freebl/genload.c
+++ b/lib/freebl/genload.c
@@ -85,7 +85,7 @@ loader_LoadLibInReferenceDir(const char* referencePath, const char* name)
{
PRLibrary* dlh = NULL;
char* fullName = NULL;
- char* c;
+ const char* c;
PRLibSpec libSpec;
/* Remove the trailing filename from referencePath and add the new one */
--
2.51.0
Description
•