From b271c94ff831e76f439bba3654e7154709a465fc Mon Sep 17 00:00:00 2001
|
From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
Date: Mon, 15 Mar 2021 08:13:14 +0100
|
Subject: [PATCH 7/8] v4l2-tpg.patch: rename min/max defines to tpg_min/max
|
|
With gcc 11 the min/max defines clash with what gcc provides,
|
so rename these defines. They are only used in the min3/max3
|
defines, so the change it kept to a minimum.
|
|
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
|
Reported-by: Gregor Jasny <gjasny@googlemail.com>
|
(cherry picked from commit 02f295d4c4c1b401cdb589df5bef2645c7f83813)
|
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
|
---
|
utils/common/v4l2-tpg.h | 10 ++++------
|
1 file changed, 4 insertions(+), 6 deletions(-)
|
|
diff --git a/utils/common/v4l2-tpg.h b/utils/common/v4l2-tpg.h
|
index c07c60aa..a86ba02a 100644
|
--- a/utils/common/v4l2-tpg.h
|
+++ b/utils/common/v4l2-tpg.h
|
@@ -26,12 +26,10 @@ typedef __s8 s8;
|
#define pr_info printf
|
#define noinline
|
|
-#ifndef min
|
-#define min(a,b) ((a) < (b) ? (a) : (b))
|
-#define max(a,b) ((a) > (b) ? (a) : (b))
|
-#endif /* !min */
|
-#define min3(x, y, z) min((typeof(x))min(x, y), z)
|
-#define max3(x, y, z) max((typeof(x))max(x, y), z)
|
+#define tpg_min(a,b) ((a) < (b) ? (a) : (b))
|
+#define tpg_max(a,b) ((a) > (b) ? (a) : (b))
|
+#define min3(x, y, z) tpg_min((typeof(x))tpg_min(x, y), z)
|
+#define max3(x, y, z) tpg_max((typeof(x))tpg_max(x, y), z)
|
#define array_size(a, b) ((a) * (b))
|
#define array3_size(a, b, c) ((a) * (b) * (c))
|
|
--
|
2.20.1
|