From 02e45f478feff28093dce66032ba8eebc08100cc Mon Sep 17 00:00:00 2001 From: Krasimir Angelov Date: Wed, 25 May 2022 08:13:03 +0200 Subject: [PATCH] avoid std::min since it is not available on macOS --- src/runtime/c/pgf/db.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/c/pgf/db.cxx b/src/runtime/c/pgf/db.cxx index 94209b0a7..848ad6a86 100644 --- a/src/runtime/c/pgf/db.cxx +++ b/src/runtime/c/pgf/db.cxx @@ -1157,7 +1157,7 @@ object PgfDB::realloc_internal(object oldo, size_t old_bytes, size_t new_bytes) } object newo = malloc_internal(new_bytes); - memcpy(base+newo, base+oldo, std::min(old_bytes,new_bytes)); + memcpy(base+newo, base+oldo, old_bytes < new_bytes ? old_bytes : new_bytes); free_internal(oldo, old_bytes); return newo; }