db-move: moved firefox-i18n from [testing] to [extra] (any)
[arch-packages.git] / v4l-utils / trunk / 0001-v4l2-tpg.patch-rename-min-max-defines-to-tpg_min-max.patch
blobd2bbc6e4154aa69eae07a56e83bda9decbb2fe98
1 From 02f295d4c4c1b401cdb589df5bef2645c7f83813 Mon Sep 17 00:00:00 2001
2 From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
3 Date: Mon, 15 Mar 2021 08:13:14 +0100
4 Subject: [PATCH] v4l2-tpg.patch: rename min/max defines to tpg_min/max
6 With gcc 11 the min/max defines clash with what gcc provides,
7 so rename these defines. They are only used in the min3/max3
8 defines, so the change it kept to a minimum.
10 Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
11 Reported-by: Gregor Jasny <gjasny@googlemail.com>
12 ---
13 utils/common/v4l2-tpg.h | 10 ++++------
14 utils/common/v4l2-tpg.patch | 12 +++++-------
15 2 files changed, 9 insertions(+), 13 deletions(-)
17 diff --git a/utils/common/v4l2-tpg.h b/utils/common/v4l2-tpg.h
18 index caf7b1a1..ecdb6eba 100644
19 --- a/utils/common/v4l2-tpg.h
20 +++ b/utils/common/v4l2-tpg.h
21 @@ -28,12 +28,10 @@ typedef __s8 s8;
22 #define pr_info printf
23 #define noinline
25 -#ifndef min
26 -#define min(a,b) ((a) < (b) ? (a) : (b))
27 -#define max(a,b) ((a) > (b) ? (a) : (b))
28 -#endif /* !min */
29 -#define min3(x, y, z) min((typeof(x))min(x, y), z)
30 -#define max3(x, y, z) max((typeof(x))max(x, y), z)
31 +#define tpg_min(a,b) ((a) < (b) ? (a) : (b))
32 +#define tpg_max(a,b) ((a) > (b) ? (a) : (b))
33 +#define min3(x, y, z) tpg_min((typeof(x))tpg_min(x, y), z)
34 +#define max3(x, y, z) tpg_max((typeof(x))tpg_max(x, y), z)
35 #define array_size(a, b) ((a) * (b))
36 #define array3_size(a, b, c) ((a) * (b) * (c))