File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -57,11 +57,23 @@ tab-size = 4
5757#include " ../btop_tools.hpp"
5858
5959#if defined(GPU_SUPPORT)
60+ // Redefining C++ keywords fortunately has a warning in clang, however it's unavoidable here
61+ // since the C library uses "class" as a struct member and keywords are not allowed to be used
62+ // as identifiers in C++.
63+ #if defined(__clang__)
64+ #pragma clang diagnostic push
65+ #pragma clang diagnostic ignored "-Wkeyword-macro"
66+ #endif // __clang__
67+
6068 #define class class_
6169extern " C" {
62- #include " ./ intel_gpu_top/intel_gpu_top.h"
70+ #include " intel_gpu_top/intel_gpu_top.h"
6371}
6472 #undef class
73+
74+ #if defined(__clang__)
75+ #pragma clang diagnostic pop
76+ #endif // __clang__
6577#endif
6678
6779using std::abs;
You can’t perform that action at this time.
0 commit comments