summaryrefslogtreecommitdiffstats
path: root/PATCHES/0025-crt-Undefine-__rdtsc-for-GCC-11.patch
blob: 8fd1dccb3f7d29574c676836b6fe3a2c489369a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
From f3e91c4d4fded83dfbced83a9449c5756d3448da Mon Sep 17 00:00:00 2001
From: Liu Hao <lh_mouse@126.com>
Date: Sat, 10 Apr 2021 20:05:36 +0800
Subject: [PATCH] crt: Undefine `__rdtsc` for GCC 11

Signed-off-by: Liu Hao <lh_mouse@126.com>
---
 mingw-w64-crt/intrincs/rdtsc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/mingw-w64-crt/intrincs/rdtsc.c b/mingw-w64-crt/intrincs/rdtsc.c
index bf9c03b34..55a31a982 100644
--- a/mingw-w64-crt/intrincs/rdtsc.c
+++ b/mingw-w64-crt/intrincs/rdtsc.c
@@ -6,6 +6,9 @@
 
 #include <intrin.h>
 
+/* GCC 11 has this as a macro.  */
+#undef __rdtsc
+
 /* Clang has support for MSVC builtins, GCC doesn't */
 #ifndef __has_builtin
   #define __has_builtin(x) 0
-- 
2.25.1