[packages/xorg-driver-video-nvidia] - rel 2 - fix building on older kernels
baggins
baggins at pld-linux.org
Mon Dec 5 00:36:39 CET 2016
commit 4ab31d9e520b350cbaf1a2d3e560dabd325687fc
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Mon Dec 5 00:36:14 2016 +0100
- rel 2
- fix building on older kernels
linux-4.1-and-older.patch | 24 ++++++++++++++++++++++++
xorg-driver-video-nvidia.spec | 4 +++-
2 files changed, 27 insertions(+), 1 deletion(-)
---
diff --git a/xorg-driver-video-nvidia.spec b/xorg-driver-video-nvidia.spec
index 47b9bf7..51ed268 100644
--- a/xorg-driver-video-nvidia.spec
+++ b/xorg-driver-video-nvidia.spec
@@ -25,7 +25,7 @@ exit 1
%define no_install_post_check_so 1
-%define rel 1
+%define rel 2
%define pname xorg-driver-video-nvidia
Summary: Linux Drivers for nVidia GeForce/Quadro Chips
Summary(hu.UTF-8): Linux meghajtók nVidia GeForce/Quadro chipekhez
@@ -47,6 +47,7 @@ Source4: 10-nvidia.conf
Source5: 10-nvidia-modules.conf
Patch0: X11-driver-nvidia-GL.patch
Patch1: X11-driver-nvidia-desktop.patch
+Patch2: linux-4.1-and-older.patch
URL: http://www.nvidia.com/object/unix.html
BuildRequires: rpmbuild(macros) >= 1.701
%{?with_kernel:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}}
@@ -251,6 +252,7 @@ rm -rf NVIDIA-Linux-x86*-%{version}*
%endif
%patch0 -p1
%patch1 -p1
+%patch2 -p1
echo 'EXTRA_CFLAGS += -Wno-pointer-arith -Wno-sign-compare -Wno-unused' >> kernel/Makefile.kbuild
%build
diff --git a/linux-4.1-and-older.patch b/linux-4.1-and-older.patch
new file mode 100644
index 0000000..cf88a4e
--- /dev/null
+++ b/linux-4.1-and-older.patch
@@ -0,0 +1,24 @@
+--- NVIDIA-Linux-x86_64-375.20-no-compat32/kernel/nvidia-drm/nvidia-drm-connector.c~ 2016-11-16 00:44:48.000000000 +0100
++++ NVIDIA-Linux-x86_64-375.20-no-compat32/kernel/nvidia-drm/nvidia-drm-connector.c 2016-12-05 00:09:42.798550337 +0100
+@@ -21,6 +21,7 @@
+ */
+
+ #include "conftest.h" /* NV_DRM_ATOMIC_MODESET_AVAILABLE */
++#include <linux/version.h>
+
+ #if defined(NV_DRM_ATOMIC_MODESET_AVAILABLE)
+
+@@ -299,7 +299,12 @@
+ return count;
+ }
+
+-static int nvidia_drm_atomic_helper_connector_dpms(
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0))
++static void
++#else
++static int
++#endif
++nvidia_drm_atomic_helper_connector_dpms(
+ struct drm_connector *connector,
+ int mode)
+ {
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/xorg-driver-video-nvidia.git/commitdiff/4ab31d9e520b350cbaf1a2d3e560dabd325687fc
More information about the pld-cvs-commit
mailing list