]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Fix this compilation issue for non-windows machines
authorAdam Stylinski <kungfujesus06@gmail.com>
Sun, 5 Jul 2026 15:31:23 +0000 (11:31 -0400)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Sat, 11 Jul 2026 10:20:28 +0000 (12:20 +0200)
I've been manually fixing this up for a bit. We're on C++ so let's just
use STL's functions here, which should compile down to min and max
instructions.

test/benchmarks/benchmark_png_shared.h

index 179a5442f19c620c98fbf92cb6187ddd6714cc4e..ef60ce1bf0b3166dc128167a3fbc18ed387ce887 100644 (file)
@@ -11,6 +11,9 @@ extern "C" {
 #  include <png.h>
 }
 
+#define MAX(a, b) std::max(a, b)
+#define MIN(a, b) std::min(a, b)
+
 typedef struct _png_dat {
     uint8_t *buf;
     int64_t len;