0001-Add-support-for-Linux-4.0.patch 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. From c35482bc0cc56b40263b74c3e58e42be867fd9f2 Mon Sep 17 00:00:00 2001
  2. From: Alberto Milone <alberto.milone@canonical.com>
  3. Date: Thu, 17 Sep 2015 15:41:46 +0200
  4. Subject: [PATCH] Add support for Linux 4.0
  5. Signed-off-by: Romain Perier <romain.perier@free-electrons.com>
  6. ---
  7. common/lib/modules/fglrx/build_mod/firegl_public.c | 5 +++++
  8. common/lib/modules/fglrx/build_mod/kcl_str.c | 4 ++++
  9. 2 files changed, 9 insertions(+)
  10. diff --git a/common/lib/modules/fglrx/build_mod/firegl_public.c b/common/lib/modules/fglrx/build_mod/firegl_public.c
  11. index 677565d..6017e89 100755
  12. --- a/common/lib/modules/fglrx/build_mod/firegl_public.c
  13. +++ b/common/lib/modules/fglrx/build_mod/firegl_public.c
  14. @@ -285,6 +285,11 @@ MODULE_DEVICE_TABLE(pci, fglrx_pci_table);
  15. MODULE_INFO(supported, "external");
  16. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 20, 0)
  17. +#define read_cr4() __read_cr4()
  18. +#define write_cr4(cr4) __write_cr4(cr4)
  19. +#endif
  20. +
  21. /* globals constants */
  22. const char* KCL_SYSINFO_OsVersionString = UTS_RELEASE;
  23. const unsigned int KCL_SYSINFO_PageSize = PAGE_SIZE;
  24. diff --git a/common/lib/modules/fglrx/build_mod/kcl_str.c b/common/lib/modules/fglrx/build_mod/kcl_str.c
  25. index 2d89eb0..bacdb69 100755
  26. --- a/common/lib/modules/fglrx/build_mod/kcl_str.c
  27. +++ b/common/lib/modules/fglrx/build_mod/kcl_str.c
  28. @@ -42,6 +42,10 @@
  29. #include "kcl_type.h"
  30. #include "kcl_str.h"
  31. +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 20, 0)
  32. +#define strnicmp strncasecmp
  33. +#endif
  34. +
  35. /** \brief Fill memory with a constant byte
  36. * \param s Pointer to memory
  37. * \param c Initializing value
  38. --
  39. 2.8.1