0001-Avoid-duplicate-definitions-of-IOPortBase.patch 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. From fc04acfd948ac99d04a5dc08c78f3b13bc0c5c41 Mon Sep 17 00:00:00 2001
  2. From: Khem Raj <raj.khem@gmail.com>
  3. Date: Mon, 17 Aug 2020 10:50:51 -0700
  4. Subject: [PATCH] Avoid duplicate definitions of IOPortBase
  5. This fixed build with gcc10/-fno-common
  6. Fixes
  7. compiler.h:528: multiple definition of `IOPortBase';
  8. Upstream-Status: Pending
  9. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  10. ---
  11. hw/xfree86/common/compiler.h | 2 +-
  12. hw/xfree86/os-support/linux/lnx_video.c | 1 +
  13. 2 files changed, 2 insertions(+), 1 deletion(-)
  14. diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h
  15. index 2b2008b..c7d617e 100644
  16. --- a/hw/xfree86/common/compiler.h
  17. +++ b/hw/xfree86/common/compiler.h
  18. @@ -525,7 +525,7 @@ xf86WriteMmio32Le(__volatile__ void *base, const unsigned long offset,
  19. #define PORT_SIZE short
  20. #endif
  21. -_X_EXPORT unsigned int IOPortBase; /* Memory mapped I/O port area */
  22. +extern _X_EXPORT unsigned int IOPortBase; /* Memory mapped I/O port area */
  23. static __inline__ void
  24. outb(unsigned PORT_SIZE port, unsigned char val)
  25. diff --git a/hw/xfree86/os-support/linux/lnx_video.c b/hw/xfree86/os-support/linux/lnx_video.c
  26. index 04e4509..9dc7316 100644
  27. --- a/hw/xfree86/os-support/linux/lnx_video.c
  28. +++ b/hw/xfree86/os-support/linux/lnx_video.c
  29. @@ -78,6 +78,7 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
  30. /***************************************************************************/
  31. /* I/O Permissions section */
  32. /***************************************************************************/
  33. +_X_EXPORT unsigned int IOPortBase; /* Memory mapped I/O port area */
  34. #if defined(__powerpc__)
  35. volatile unsigned char *ioBase = NULL;
  36. --
  37. 2.28.0