-
Notifications
You must be signed in to change notification settings - Fork 514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dkms build fails on kernel version >6.8.0 #575
Labels
duplicate
there's already a bug describing the same problem. please enhance the original issue.
pending
topic:kernel
things regarding the actual kernel module
Comments
@jschwender fix is already in (yet unreleased) code: first with commit ee177b6 and refined by commit b261f19 |
I can confirm with EndeavourOS:
|
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
duplicate
there's already a bug describing the same problem. please enhance the original issue.
pending
topic:kernel
things regarding the actual kernel module
build fails with error on strlcpy() function.
gcc (Ubuntu 13.2.0-4ubuntu3) 13.2.0
v4l2loopback
version: 0.12.7lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 23.10
Release: 23.10
Codename: mantic
Steps to reproduce:
build vanilla kernel 6.8.0
run dkms build on installation the kernel
Observed Results:
build fails
Suggested fix:
--- v4l2loopback.c.sav 2023-07-05 14:05:05.000000000 +0200
+++ v4l2loopback.c 2024-03-12 08:36:48.736536585 +0100
@@ -739,7 +739,11 @@
->devicenr;
__u32 capabilities = V4L2_CAP_STREAMING | V4L2_CAP_READWRITE;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)
strlcpy(cap->driver, "v4l2 loopback", sizeof(cap->driver));
+#else
+#endif
vidioc_fill_name(cap->card, sizeof(cap->card), devnr);
snprintf(cap->bus_info, sizeof(cap->bus_info),
"platform:v4l2loopback-%03d", devnr);
@@ -1247,7 +1251,11 @@
if (!cnf)
BUG();
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)
strlcpy(q->name, cnf->name, sizeof(q->name));
+#else
strscpy(q->name, cnf->name, sizeof(q->name));
+#endif
q->default_value = cnf->def;
q->type = cnf->type;
q->minimum = cnf->min;
@@ -1352,7 +1360,11 @@
memset(outp, 0, sizeof(*outp));
outp->index = index;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)
strlcpy(outp->name, "loopback in", sizeof(outp->name));
+#else
strscpy(outp->name, "loopback in", sizeof(outp->name));
+#endif
outp->type = V4L2_OUTPUT_TYPE_ANALOG;
outp->audioset = 0;
outp->modulator = 0;
@@ -1411,7 +1423,11 @@
memset(inp, 0, sizeof(*inp));
inp->index = index;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0)
strlcpy(inp->name, "loopback", sizeof(inp->name));
+#else
strscpy(inp->name, "loopback", sizeof(inp->name));
+#endif
inp->type = V4L2_INPUT_TYPE_CAMERA;
inp->audioset = 0;
inp->tuner = 0;
replacing the function for kernels > 6.8 works for me, but i don't feel involved enough with the code, so i want you to look over it and decide if that is a good idea or not. Hope it helps.
The text was updated successfully, but these errors were encountered: