diff --git a/packages/security/nss/patches/nss-11-D174822-allow-build-with-gcc-13.patch b/packages/security/nss/patches/nss-11-D174822-allow-build-with-gcc-13.patch new file mode 100644 index 0000000000..dbb88d0cbb --- /dev/null +++ b/packages/security/nss/patches/nss-11-D174822-allow-build-with-gcc-13.patch @@ -0,0 +1,77 @@ +diff --git a/nss/cmd/ecperf/ecperf.c b/nss/cmd/ecperf/ecperf.c +--- a/nss/cmd/ecperf/ecperf.c ++++ b/nss/cmd/ecperf/ecperf.c +@@ -51,10 +51,11 @@ + int iters = threadData->iters; + unsigned char sigData[256]; + SECItem sig; + CK_SESSION_HANDLE session; + CK_RV crv; ++ void *tmp = NULL; + + threadData->status = SECSuccess; + threadData->count = 0; + + /* get our thread's session */ +@@ -66,10 +67,11 @@ + } + + if (threadData->isSign) { + sig.data = sigData; + sig.len = sizeof(sigData); ++ tmp = threadData->p2; + threadData->p2 = (void *)&sig; + } + + while (iters--) { + threadData->status = (*op)(session, threadData->p1, +@@ -77,27 +79,33 @@ + if (threadData->status != SECSuccess) { + break; + } + threadData->count++; + } ++ ++ if (threadData->isSign) { ++ threadData->p2 = tmp; ++ } + return; + } + + void + genericThread(void *data) + { + ThreadData *threadData = (ThreadData *)data; + int iters = threadData->iters; + unsigned char sigData[256]; + SECItem sig; ++ void *tmp = NULL; + + threadData->status = SECSuccess; + threadData->count = 0; + + if (threadData->isSign) { + sig.data = sigData; + sig.len = sizeof(sigData); ++ tmp = threadData->p2; + threadData->p2 = (void *)&sig; + } + + while (iters--) { + threadData->status = (*threadData->op)(threadData->p1, +@@ -105,10 +113,14 @@ + if (threadData->status != SECSuccess) { + break; + } + threadData->count++; + } ++ ++ if (threadData->isSign) { ++ threadData->p2 = tmp; ++ } + return; + } + + /* Time iter repetitions of operation op. */ + SECStatus +