deepin-screen-recorder/0001-Fix-build-failure-with-gcc-10.patch

44 lines
1.1 KiB
Diff
Raw Normal View History

From 668d4917a443d5197bc3d26894ac5f0a0b62ff5c Mon Sep 17 00:00:00 2001
From: loong_C <loong_c@yeah.net>
Date: Wed, 20 Jul 2022 10:32:33 +0800
Subject: [PATCH] Fix-build-failure-with-gcc-10
2021-08-11 14:25:26 +08:00
---
src/event_monitor.cpp | 4 ++++
2021-08-11 14:25:26 +08:00
src/screen_shot_event.cpp | 4 ++++
2 files changed, 8 insertions(+)
2021-08-11 14:25:26 +08:00
diff --git a/src/event_monitor.cpp b/src/event_monitor.cpp
index 5fb2d83..caaab95 100755
2021-08-11 14:25:26 +08:00
--- a/src/event_monitor.cpp
+++ b/src/event_monitor.cpp
@@ -23,6 +23,10 @@
#include "keydefine.h"
2021-08-11 14:25:26 +08:00
#include <X11/Xlibint.h>
+// gcc 版本大于10时取消min 宏定义
+#if __GNUC__ == 10
+#undef min
+#endif
#include <X11/Xutil.h>
#include <X11/cursorfont.h>
#include <X11/keysymdef.h>
diff --git a/src/screen_shot_event.cpp b/src/screen_shot_event.cpp
index 2ff3134..28d1360 100755
2021-08-11 14:25:26 +08:00
--- a/src/screen_shot_event.cpp
+++ b/src/screen_shot_event.cpp
@@ -23,6 +23,10 @@
#include "keydefine.h"
2021-08-11 14:25:26 +08:00
#include <X11/Xlibint.h>
+// gcc 版本大于10时取消min 宏定义
+#if __GNUC__ == 10
+#undef min
+#endif
#include <X11/Xutil.h>
#include <X11/cursorfont.h>
#include <X11/keysymdef.h>
--
2.20.1