File 0019-kernel-5.16.patch of Package x11-video-nvidiaG02
diff -ruN NVIDIA-Linux-x86_64-304.137p1/kernel/nv.h NVIDIA-Linux-x86_64-304.137p2/kernel/nv.h --- NVIDIA-Linux-x86_64-304.137p1/nv.h 2022-06-25 19:30:43.581238269 -0300 +++ NVIDIA-Linux-x86_64-304.137p2/nv.h 2022-06-25 19:33:17.514321580 -0300 @@ -13,7 +13,12 @@ #define _NV_H_ #include <nvtypes.h> +#include <linux/version.h> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0) +#include <linux/stdarg.h> +#else #include <stdarg.h> +#endif #if !defined(NV_MIN) #define NV_MIN(_a,_b) ((_a) < (_b) ? (_a) : (_b)) diff -ruN NVIDIA-Linux-x86_64-304.137p1/kernel/os-interface.h NVIDIA-Linux-x86_64-304.137p2/kernel/os-interface.h --- NVIDIA-Linux-x86_64-304.137p1/os-interface.h 2017-09-14 17:51:09.000000000 -0300 +++ NVIDIA-Linux-x86_64-304.137p2/os-interface.h 2022-06-25 19:32:47.680977591 -0300 @@ -24,7 +24,12 @@ * * \***************************************************************************/ +#include <linux/version.h> +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0) +#include <linux/stdarg.h> +#else #include <stdarg.h> +#endif /* * Define away Microsoft compiler extensions when possible