diff options
author | Lenard Spencer <lenardrspencer@gmail.com> | 2021-05-10 20:09:20 +0200 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2021-05-17 08:49:45 +0700 |
commit | 850efa92bfdd4c27cdd5abd001a5bc429d700aa1 (patch) | |
tree | 0856499ff9d9a10da7d412aed7b31de9c4c1c91c /system/nvidia-legacy390-driver/nvidia-installer-removed-sysctl-h.patch | |
parent | d031160eb3e0ac66748a5f6860382618818d7140 (diff) |
system/nvidia-legacy390-driver: Updated for version 390.143.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/nvidia-legacy390-driver/nvidia-installer-removed-sysctl-h.patch')
-rw-r--r-- | system/nvidia-legacy390-driver/nvidia-installer-removed-sysctl-h.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/system/nvidia-legacy390-driver/nvidia-installer-removed-sysctl-h.patch b/system/nvidia-legacy390-driver/nvidia-installer-removed-sysctl-h.patch new file mode 100644 index 0000000000000..7b230fcb11d38 --- /dev/null +++ b/system/nvidia-legacy390-driver/nvidia-installer-removed-sysctl-h.patch @@ -0,0 +1,36 @@ +diff -Naur nvidia-installer-460.67.orig/kernel.c nvidia-installer-460.67/kernel.c +--- nvidia-installer-460.67.orig/kernel.c 2021-03-10 19:24:00.000000000 -0500 ++++ nvidia-installer-460.67/kernel.c 2021-04-16 17:59:48.828574898 -0400 +@@ -23,7 +23,10 @@ + #include <sys/utsname.h> + #include <sys/types.h> + #include <sys/stat.h> +-#include <sys/sysctl.h> ++#include <gnu/libc-version.h> ++#if __GLIBC__ == 2 && __GLIBC_MINOR__ <= 30 ++ #include <sys/sysctl.h> ++#endif + #include <ctype.h> + #include <stdlib.h> + #include <dirent.h> +@@ -1076,7 +1079,8 @@ + } + + if (!loglevel_set) { +- /* ++#if __GLIBC__ == 2 && __GLIBC_MINOR__ <= 30 ++ /* + * Explicitly initialize the value of len, even though it looks like the + * syscall should do that, since in practice it doesn't always actually + * set the value of the pointed-to length parameter. +@@ -1090,6 +1094,10 @@ + loglevel_set = TRUE; + } + } ++#else /* sys/sysctl.h has been removed from glibc 2.32 and later */ ++ if (!old_level) ++ loglevel_set = TRUE; ++#endif + } + + return loglevel_set; |