File: conflicting_typedef.patch

package info (click to toggle)
kwayland-kf5 4%3A5.116.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,436 kB
  • sloc: cpp: 61,749; ansic: 496; xml: 446; makefile: 7
file content (43 lines) | stat: -rw-r--r-- 1,499 bytes parent folder | download
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Description: Prevent conflicting typedefs
Author: Bastian Germann
Bug-Debian: https://bugs.debian.org/1099241
---
--- kwayland-kf5-5.115.0.orig/src/server/drm_fourcc.h
+++ kwayland-kf5-5.115.0/src/server/drm_fourcc.h
@@ -11,16 +11,13 @@
 
 //#include "drm.h"
 
-// These typedefs are copied from drm.h
-typedef uint32_t __u32;
-typedef uint64_t __u64;
 
 #if defined(__cplusplus)
 extern "C" {
 #endif
 
-#define fourcc_code(a, b, c, d) ((__u32)(a) | ((__u32)(b) << 8) | \
-				 ((__u32)(c) << 16) | ((__u32)(d) << 24))
+#define fourcc_code(a, b, c, d) ((uint32_t)(a) | ((uint32_t)(b) << 8) | \
+				 ((uint32_t)(c) << 16) | ((uint32_t)(d) << 24))
 
 #define DRM_FORMAT_BIG_ENDIAN (1<<31) /* format is big endian instead of little endian */
 
@@ -177,7 +174,7 @@ extern "C" {
 #define DRM_FORMAT_RESERVED	      ((1ULL << 56) - 1)
 
 #define fourcc_mod_code(vendor, val) \
-	((((__u64)DRM_FORMAT_MOD_VENDOR_## vendor) << 56) | (val & 0x00ffffffffffffffULL))
+	((((uint64_t)DRM_FORMAT_MOD_VENDOR_## vendor) << 56) | (val & 0x00ffffffffffffffULL))
 
 /*
  * Format Modifier tokens:
@@ -335,7 +332,7 @@ extern "C" {
  */
 #define __fourcc_mod_tegra_mode_shift 32
 #define fourcc_mod_tegra_code(val, params) \
-	fourcc_mod_code(NV, ((((__u64)val) << __fourcc_mod_tegra_mode_shift) | params))
+	fourcc_mod_code(NV, ((((uint64_t)val) << __fourcc_mod_tegra_mode_shift) | params))
 #define fourcc_mod_tegra_mod(m) \
 	(m & ~((1ULL << __fourcc_mod_tegra_mode_shift) - 1))
 #define fourcc_mod_tegra_param(m) \