summaryrefslogtreecommitdiff
path: root/package/xorg-server/patches
diff options
context:
space:
mode:
Diffstat (limited to 'package/xorg-server/patches')
-rw-r--r--package/xorg-server/patches/patch-hw_xfree86_common_compiler_h69
-rw-r--r--package/xorg-server/patches/patch-include_misc_h50
2 files changed, 50 insertions, 69 deletions
diff --git a/package/xorg-server/patches/patch-hw_xfree86_common_compiler_h b/package/xorg-server/patches/patch-hw_xfree86_common_compiler_h
deleted file mode 100644
index 824744f53..000000000
--- a/package/xorg-server/patches/patch-hw_xfree86_common_compiler_h
+++ /dev/null
@@ -1,69 +0,0 @@
-from alpinelinux
-
---- xorg-server-1.18.0.orig/hw/xfree86/common/compiler.h 2015-10-28 19:15:36.000000000 +0100
-+++ xorg-server-1.18.0/hw/xfree86/common/compiler.h 2016-01-08 01:41:49.582326445 +0100
-@@ -525,26 +525,26 @@ xf86WriteMmio32Le(__volatile__ void *bas
- #define PORT_SIZE short
- #endif
-
--_X_EXPORT unsigned int IOPortBase; /* Memory mapped I/O port area */
-+_X_EXPORT volatile unsigned char *ioBase; /* Memory mapped I/O port area */
-
- static __inline__ void
- outb(unsigned PORT_SIZE port, unsigned char val)
- {
-- *(volatile unsigned char *) (((unsigned PORT_SIZE) (port)) + IOPortBase) =
-+ *(volatile unsigned char *) (((unsigned PORT_SIZE) (port)) + ioBase) =
- val;
- }
-
- static __inline__ void
- outw(unsigned PORT_SIZE port, unsigned short val)
- {
-- *(volatile unsigned short *) (((unsigned PORT_SIZE) (port)) + IOPortBase) =
-+ *(volatile unsigned short *) (((unsigned PORT_SIZE) (port)) + ioBase) =
- val;
- }
-
- static __inline__ void
- outl(unsigned PORT_SIZE port, unsigned int val)
- {
-- *(volatile unsigned int *) (((unsigned PORT_SIZE) (port)) + IOPortBase) =
-+ *(volatile unsigned int *) (((unsigned PORT_SIZE) (port)) + ioBase) =
- val;
- }
-
-@@ -552,21 +552,21 @@ static __inline__ unsigned int
- inb(unsigned PORT_SIZE port)
- {
- return *(volatile unsigned char *) (((unsigned PORT_SIZE) (port)) +
-- IOPortBase);
-+ ioBase);
- }
-
- static __inline__ unsigned int
- inw(unsigned PORT_SIZE port)
- {
- return *(volatile unsigned short *) (((unsigned PORT_SIZE) (port)) +
-- IOPortBase);
-+ ioBase);
- }
-
- static __inline__ unsigned int
- inl(unsigned PORT_SIZE port)
- {
- return *(volatile unsigned int *) (((unsigned PORT_SIZE) (port)) +
-- IOPortBase);
-+ ioBase);
- }
-
- #if defined(__mips__)
-@@ -758,7 +758,7 @@ inl(unsigned short port)
- return xf86ReadMmio32Le((void *) ioBase, port);
- }
-
--#elif defined(__arm__) && defined(__linux__)
-+#elif defined(__arm__) && defined(__GLIBC__)
-
- /* for Linux on ARM, we use the LIBC inx/outx routines */
- /* note that the appropriate setup via "ioperm" needs to be done */
diff --git a/package/xorg-server/patches/patch-include_misc_h b/package/xorg-server/patches/patch-include_misc_h
new file mode 100644
index 000000000..820df214a
--- /dev/null
+++ b/package/xorg-server/patches/patch-include_misc_h
@@ -0,0 +1,50 @@
+--- xorg-server-21.1.0.orig/include/misc.h 2021-10-27 12:47:08.000000000 +0200
++++ xorg-server-21.1.0/include/misc.h 2021-11-12 22:48:04.777225906 +0100
+@@ -298,33 +298,12 @@ __builtin_constant_p(int x)
+ }
+ #endif
+
+-static inline uint64_t
+-bswap_64(uint64_t x)
+-{
+- return (((x & 0xFF00000000000000ull) >> 56) |
+- ((x & 0x00FF000000000000ull) >> 40) |
+- ((x & 0x0000FF0000000000ull) >> 24) |
+- ((x & 0x000000FF00000000ull) >> 8) |
+- ((x & 0x00000000FF000000ull) << 8) |
+- ((x & 0x0000000000FF0000ull) << 24) |
+- ((x & 0x000000000000FF00ull) << 40) |
+- ((x & 0x00000000000000FFull) << 56));
+-}
+-
+ #define swapll(x) do { \
+ if (sizeof(*(x)) != 8) \
+ wrong_size(); \
+ *(x) = bswap_64(*(x)); \
+ } while (0)
+
+-static inline uint32_t
+-bswap_32(uint32_t x)
+-{
+- return (((x & 0xFF000000) >> 24) |
+- ((x & 0x00FF0000) >> 8) |
+- ((x & 0x0000FF00) << 8) |
+- ((x & 0x000000FF) << 24));
+-}
+
+ static inline Bool
+ checked_int64_add(int64_t *out, int64_t a, int64_t b)
+@@ -361,13 +340,6 @@ checked_int64_subtract(int64_t *out, int
+ *(x) = bswap_32(*(x)); \
+ } while (0)
+
+-static inline uint16_t
+-bswap_16(uint16_t x)
+-{
+- return (((x & 0xFF00) >> 8) |
+- ((x & 0x00FF) << 8));
+-}
+-
+ #define swaps(x) do { \
+ if (sizeof(*(x)) != 2) \
+ wrong_size(); \