commit c4d3e5e4b910336e2b94e8506412576c6c8efd95
Author: Łukasz Wojniłowicz <lukasz.wojnilowicz(a)gmail.com>
Date: Thu Apr 11 20:36:32 2024 +0200
Fix efi_enabled type
fix_efi_enabled_type.patch | 12 ++++++++++++
nvidia-340xx-kmod.spec | 7 ++++++-
2 files changed, 18 insertions(+), 1 deletion(-)
---
diff --git a/fix_efi_enabled_type.patch b/fix_efi_enabled_type.patch
new file mode 100644
index 0000000..70ce1e6
--- /dev/null
+++ b/fix_efi_enabled_type.patch
@@ -0,0 +1,12 @@
+diff -Naur a/kernel/nv-linux.h b/kernel/nv-linux.h
+--- a/kernel/nv-linux.h 2023-09-11 17:08:50.919035000 +0200
++++ b/kernel/nv-linux.h 2024-04-11 20:08:16.180864120 +0200
+@@ -195,7 +195,7 @@
+ #endif
+ #elif !defined(NV_VMWARE) && \
+ (defined(NV_EFI_ENABLED_PRESENT) || defined(efi_enabled))
+-#define NV_EFI_ENABLED() efi_enabled
++#define NV_EFI_ENABLED() ((int)efi_enabled)
+ #else
+ #define NV_EFI_ENABLED() 0
+ #endif
diff --git a/nvidia-340xx-kmod.spec b/nvidia-340xx-kmod.spec
index a870458..292a312 100644
--- a/nvidia-340xx-kmod.spec
+++ b/nvidia-340xx-kmod.spec
@@ -12,7 +12,7 @@ Name: nvidia-340xx-kmod
Epoch: 1
Version: 340.108
# Taken over by kmodtool
-Release: 31%{?dist}
+Release: 32%{?dist}
Summary: NVIDIA display driver kernel module
Group: System Environment/Kernel
License: Redistributable, no modification permitted
@@ -26,6 +26,7 @@ Patch3: kernel-6.5.2.patch
Patch4: kernel-6.6.1.patch
Patch5: kernel-6.8.2.patch
Patch6: gcc-14.patch
+Patch7: fix_efi_enabled_type.patch
BuildRequires: elfutils-libelf-devel
BuildRequires: gcc
@@ -59,6 +60,7 @@ tar --use-compress-program xz -xf
%{_datadir}/%{name}-%{version}/%{name}-%{versi
%patch 4 -p1
%patch 5 -p1
%patch 6 -p1
+%patch 7 -p1
for kernel_version in %{?kernel_versions} ; do
cp -a kernel _kmod_build_${kernel_version%%___*}
@@ -87,6 +89,9 @@ done
%{?akmod_install}
%changelog
+* Thu Apr 11 2024 Łukasz Wojniłowicz <lukasz.wojnilowicz(a)gmail.com> - 1:340.108-32
+- Fix efi_enabled type
+
* Tue Apr 09 2024 Łukasz Wojniłowicz <lukasz.wojnilowicz(a)gmail.com> - 1:340.108-31
- Fix build on gcc-14