0003-Fix-build-with-fno-common.patch 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. From 08d57adf499264fcd32461a4092cd799c474d669 Mon Sep 17 00:00:00 2001
  2. From: Alexander Tsoy <alexander@tsoy.me>
  3. Date: Tue, 28 Jan 2020 22:21:01 +0300
  4. Subject: [PATCH] Fix build with -fno-common
  5. GCC 10 defaults to -fno-common
  6. Upstream: https://github.com/LibVNC/x11vnc/commit/a48b0b1cd887d7f3ae67f525d7d334bd2feffe60
  7. Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>
  8. ---
  9. src/util.c | 3 +++
  10. src/util.h | 6 +++---
  11. 2 files changed, 6 insertions(+), 3 deletions(-)
  12. diff --git a/src/util.c b/src/util.c
  13. index a82a1a4..6a52ebf 100644
  14. --- a/src/util.c
  15. +++ b/src/util.c
  16. @@ -47,6 +47,9 @@ int hxl = 0;
  17. #ifdef LIBVNCSERVER_HAVE_LIBPTHREAD
  18. MUTEX(x11Mutex);
  19. MUTEX(scrollMutex);
  20. +MUTEX(clientMutex);
  21. +MUTEX(inputMutex);
  22. +MUTEX(pointerMutex);
  23. #endif
  24. int nfix(int i, int n);
  25. diff --git a/src/util.h b/src/util.h
  26. index 35c1afd..99b5dd1 100644
  27. --- a/src/util.h
  28. +++ b/src/util.h
  29. @@ -102,9 +102,9 @@ extern struct timeval _mysleep;
  30. #ifdef LIBVNCSERVER_HAVE_LIBPTHREAD
  31. extern MUTEX(x11Mutex);
  32. extern MUTEX(scrollMutex);
  33. -MUTEX(clientMutex);
  34. -MUTEX(inputMutex);
  35. -MUTEX(pointerMutex);
  36. +extern MUTEX(clientMutex);
  37. +extern MUTEX(inputMutex);
  38. +extern MUTEX(pointerMutex);
  39. #endif
  40. #define X_INIT INIT_MUTEX(x11Mutex)
  41. --
  42. 2.43.0