mirror of
https://github.com/termux/termux-packages.git
synced 2025-01-19 16:52:16 +00:00
a9271d63c9
This commit fixes the following compiler error with KDE frameworks. wayland-util.h:51:5: error: '__STDC_VERSION__' is not defined, evaluates to 0 [-Werror,-Wundef] 51 | #if __STDC_VERSION__ >= 202311L | ^ wayland-util.h:73:5: error: '__STDC_VERSION__' is not defined, evaluates to 0 [-Werror,-Wundef] 73 | #if __STDC_VERSION__ >= 202311L | ^ Also, add `setup' option with meson command to fix the following. WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.
24 lines
692 B
Diff
24 lines
692 B
Diff
https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/438
|
|
|
|
--- a/src/wayland-util.h
|
|
+++ b/src/wayland-util.h
|
|
@@ -48,7 +48,8 @@
|
|
#endif
|
|
|
|
/** Deprecated attribute */
|
|
-#if __STDC_VERSION__ >= 202311L
|
|
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L \
|
|
+ || defined(__cplusplus) && __cplusplus >= 201402L
|
|
#define WL_DEPRECATED [[deprecated]]
|
|
#elif defined(__GNUC__) && __GNUC__ >= 4
|
|
#define WL_DEPRECATED __attribute__ ((deprecated))
|
|
@@ -70,7 +71,7 @@
|
|
#define WL_PRINTF(x, y)
|
|
#endif
|
|
|
|
-#if __STDC_VERSION__ >= 202311L
|
|
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
|
|
#define WL_TYPEOF(expr) typeof(expr)
|
|
#else
|
|
#define WL_TYPEOF(expr) __typeof__(expr)
|