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
6 Signed-off-by: Romain Perier <romain.perier@free-electrons.com>
8 common/lib/modules/fglrx/build_mod/firegl_public.c | 5 +++++
9 common/lib/modules/fglrx/build_mod/kcl_str.c | 4 ++++
10 2 files changed, 9 insertions(+)
12 diff --git a/common/lib/modules/fglrx/build_mod/firegl_public.c b/common/lib/modules/fglrx/build_mod/firegl_public.c
13 index 677565d..6017e89 100755
14 --- a/common/lib/modules/fglrx/build_mod/firegl_public.c
15 +++ b/common/lib/modules/fglrx/build_mod/firegl_public.c
16 @@ -285,6 +285,11 @@ MODULE_DEVICE_TABLE(pci, fglrx_pci_table);
18 MODULE_INFO(supported, "external");
20 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 20, 0)
21 +#define read_cr4() __read_cr4()
22 +#define write_cr4(cr4) __write_cr4(cr4)
25 /* globals constants */
26 const char* KCL_SYSINFO_OsVersionString = UTS_RELEASE;
27 const unsigned int KCL_SYSINFO_PageSize = PAGE_SIZE;
28 diff --git a/common/lib/modules/fglrx/build_mod/kcl_str.c b/common/lib/modules/fglrx/build_mod/kcl_str.c
29 index 2d89eb0..bacdb69 100755
30 --- a/common/lib/modules/fglrx/build_mod/kcl_str.c
31 +++ b/common/lib/modules/fglrx/build_mod/kcl_str.c
36 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 20, 0)
37 +#define strnicmp strncasecmp
40 /** \brief Fill memory with a constant byte
41 * \param s Pointer to memory
42 * \param c Initializing value