diff options
Diffstat (limited to 'app-emulation/vendor-reset/files/vendor-reset-0.1.1-fix-build-on-kernel-6.8.patch')
-rw-r--r-- | app-emulation/vendor-reset/files/vendor-reset-0.1.1-fix-build-on-kernel-6.8.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/app-emulation/vendor-reset/files/vendor-reset-0.1.1-fix-build-on-kernel-6.8.patch b/app-emulation/vendor-reset/files/vendor-reset-0.1.1-fix-build-on-kernel-6.8.patch new file mode 100644 index 000000000000..d99212c9ee27 --- /dev/null +++ b/app-emulation/vendor-reset/files/vendor-reset-0.1.1-fix-build-on-kernel-6.8.patch @@ -0,0 +1,35 @@ +https://github.com/gnif/vendor-reset/commit/f72619e468846e0bab4426f5e71b069f88c33a11.patch +From: Sakari <20642596+sakarie9@users.noreply.github.com> +Date: Thu, 14 Mar 2024 10:59:15 +0800 +Subject: [PATCH] Fix build on kernel 6.8+ + +--- a/src/amd/amdgpu/atom.c ++++ b/src/amd/amdgpu/atom.c +@@ -28,6 +28,7 @@ + #include <linux/sched.h> + #include <linux/slab.h> + #include <linux/delay.h> ++#include <linux/version.h> + #include <asm/unaligned.h> + + //#include <drm/drm_util.h> +@@ -39,6 +40,10 @@ + #include "atom-names.h" + #include "atom-bits.h" + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0) ++#define strscpy strlcpy ++#endif ++ + #define ATOM_COND_ABOVE 0 + #define ATOM_COND_ABOVEOREQUAL 1 + #define ATOM_COND_ALWAYS 2 +@@ -1424,7 +1429,7 @@ struct atom_context *amdgpu_atom_parse(struct card_info *card, void *bios) + if (*str != '\0') + { + pr_info("ATOM BIOS: %s\n", str); +- strlcpy(ctx->vbios_version, str, sizeof(ctx->vbios_version)); ++ strscpy(ctx->vbios_version, str, sizeof(ctx->vbios_version)); + } + + return ctx; |