]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
fix #4312
authorYann Collet <yann.collet.73@gmail.com>
Tue, 11 Mar 2025 08:57:24 +0000 (01:57 -0700)
committerYann Collet <cyan@fb.com>
Tue, 11 Mar 2025 21:10:35 +0000 (14:10 -0700)
and upgraded the test so that it would fail, both at compile time and at run time, without the fix

lib/dictBuilder/cover.c

index cfb756ff28e1349cf2851c4f4990c56322de16b3..ed750e31d65c1b163c28ff12860a828912bad218 100644 (file)
@@ -284,7 +284,7 @@ static int COVER_cmp8(COVER_ctx_t *ctx, const void *lp, const void *rp) {
  */
 #if (defined(_WIN32) && defined(_MSC_VER)) || defined(__APPLE__)
 static int WIN_CDECL COVER_strict_cmp(void* g_coverCtx, const void* lp, const void* rp) {
-#elif defined(_GNU_SOURCE)
+#elif defined(_GNU_SOURCE) && !defined(ZSTD_USE_C90_QSORT)
 static int COVER_strict_cmp(const void *lp, const void *rp, void *g_coverCtx) {
 #else /* C90 fallback.*/
 static int COVER_strict_cmp(const void *lp, const void *rp) {
@@ -300,7 +300,7 @@ static int COVER_strict_cmp(const void *lp, const void *rp) {
  */
 #if (defined(_WIN32) && defined(_MSC_VER)) || defined(__APPLE__)
 static int WIN_CDECL COVER_strict_cmp8(void* g_coverCtx, const void* lp, const void* rp) {
-#elif defined(_GNU_SOURCE)
+#elif defined(_GNU_SOURCE) && !defined(ZSTD_USE_C90_QSORT)
 static int COVER_strict_cmp8(const void *lp, const void *rp, void *g_coverCtx) {
 #else /* C90 fallback.*/
 static int COVER_strict_cmp8(const void *lp, const void *rp) {