deepin-screen-recorder/0001-Fix-build-failure-with-gcc-10.patch
loong_C 4c450a6085 update version to 5.9.13
(cherry picked from commit 286ca9984ca7610f03a0aa67422dad17e878a65e)
2022-07-28 18:05:48 +08:00

44 lines
1.1 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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
---
src/event_monitor.cpp | 4 ++++
src/screen_shot_event.cpp | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/src/event_monitor.cpp b/src/event_monitor.cpp
index 5fb2d83..caaab95 100755
--- a/src/event_monitor.cpp
+++ b/src/event_monitor.cpp
@@ -23,6 +23,10 @@
#include "keydefine.h"
#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
--- a/src/screen_shot_event.cpp
+++ b/src/screen_shot_event.cpp
@@ -23,6 +23,10 @@
#include "keydefine.h"
#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