ports/multimedia/libv4l/files/patch-libv4lconvert_control_libv4lcontrol.c
Koop Mast 6ffff77c7b Update to 0.8.8.
Approved by:	maintainer
2012-05-10 15:06:06 +00:00

15 lines
522 B
C

--- libv4lconvert/control/libv4lcontrol.c.orig 2012-05-02 21:17:37.000000000 +0200
+++ libv4lconvert/control/libv4lcontrol.c 2012-05-06 08:52:42.000000000 +0200
@@ -456,7 +456,12 @@
while (isspace(*start)) start++;
n = strlen(start);
while (n > 0 && isspace(start[n-1])) --n;
+#ifndef __FreeBSD__
trimmed_dmi = strndupa(start, n);
+#else
+ trimmed_dmi = (char *)alloca(n + 1);
+ strlcpy(trimmed_dmi, start, n + 1);
+#endif
/* find trimmed value */
for (entry_ptr = table_entries; *entry_ptr; entry_ptr++) {