From df3fdbdeb50b7b240a7ec81a5ea08e3541d2a51c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timur=20Krist=C3=B3f?= Date: Wed, 5 Oct 2022 09:53:10 -0500 Subject: [PATCH] aco: Fix build error with std::max on GCC 12 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Timur Kristóf Reviewed-by: Daniel Schürmann Part-of: --- src/amd/compiler/aco_util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/compiler/aco_util.h b/src/amd/compiler/aco_util.h index a046e5c123d..71c78327402 100644 --- a/src/amd/compiler/aco_util.h +++ b/src/amd/compiler/aco_util.h @@ -413,7 +413,7 @@ public: /* The size parameter refers to the total size of the buffer. * The usable data_size is size - sizeof(Buffer). */ - size = std::max(size, minimum_size); + size = MAX2(size, minimum_size); buffer = (Buffer*)malloc(size); buffer->next = nullptr; buffer->data_size = size - sizeof(Buffer);