diff options
author | nox <nox@FreeBSD.org> | 2015-03-29 01:17:32 +0800 |
---|---|---|
committer | nox <nox@FreeBSD.org> | 2015-03-29 01:17:32 +0800 |
commit | b7162c33d5d886f9181f3a161e815da13fabd625 (patch) | |
tree | 8ab02a765541624fe3bd50341cc02bb389e516a9 /multimedia | |
parent | f9bb853440ba2b641e87692b1877de46cb05f64b (diff) | |
download | freebsd-ports-gnome-b7162c33d5d886f9181f3a161e815da13fabd625.tar.gz freebsd-ports-gnome-b7162c33d5d886f9181f3a161e815da13fabd625.tar.zst freebsd-ports-gnome-b7162c33d5d886f9181f3a161e815da13fabd625.zip |
Fix build on 8 and 9.
Submitted by: beefy1 via pkg-fallout
Diffstat (limited to 'multimedia')
-rw-r--r-- | multimedia/v4l-utils/files/patch-v4l2-ctl__v4l2-ctl.cpp | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/multimedia/v4l-utils/files/patch-v4l2-ctl__v4l2-ctl.cpp b/multimedia/v4l-utils/files/patch-v4l2-ctl__v4l2-ctl.cpp index 01a28d4818cc..ce0621f59375 100644 --- a/multimedia/v4l-utils/files/patch-v4l2-ctl__v4l2-ctl.cpp +++ b/multimedia/v4l-utils/files/patch-v4l2-ctl__v4l2-ctl.cpp @@ -1,5 +1,5 @@ ---- v4l2-ctl/v4l2-ctl.cpp.orig 2012-04-14 19:33:44.000000000 +0200 -+++ v4l2-ctl/v4l2-ctl.cpp 2015-03-17 21:05:27.176219337 +0100 +--- v4l2-ctl/v4l2-ctl.cpp.orig ++++ v4l2-ctl/v4l2-ctl.cpp @@ -21,7 +21,6 @@ */ @@ -16,10 +16,29 @@ #include <linux/videodev2.h> #include <libv4l2.h> -@@ -1643,10 +1641,31 @@ - printf("%s\n", iter->second.c_str()); +@@ -1644,9 +1642,50 @@ static void list_devices() } } + ++#if __FreeBSD_version < 1000000 ++/* from FreeBSD src/lib/libc/string/strchrnul.c: */ ++ ++char *strchrnul(const char *p, int ch); ++ ++char * ++strchrnul(const char *p, int ch) ++{ ++ char c; ++ ++ c = ch; ++ for (;; ++p) { ++ if (*p == c || *p == '\0') ++ return ((char *)p); ++ } ++ /* NOTREACHED */ ++} ++#endif ++ +int +my_getsubopt (char **optionp, char *const *tokens, char **valuep) +{ @@ -41,7 +60,7 @@ + + return -1; +} - ++ static int parse_subopt(char **subs, const char * const *subopts, char **value) { - int opt = getsubopt(subs, (char * const *)subopts, value); @@ -49,7 +68,7 @@ if (opt == -1) { fprintf(stderr, "Invalid suboptions specified\n"); -@@ -1667,7 +1686,7 @@ +@@ -1667,7 +1704,7 @@ static void parse_next_subopt(char **sub static char *const subopts[] = { NULL }; @@ -58,7 +77,7 @@ if (value == NULL) { fprintf(stderr, "No value given to suboption <%s>\n", -@@ -3493,6 +3512,7 @@ +@@ -3493,6 +3530,7 @@ int main(int argc, char **argv) static char buf[40960]; int len; @@ -66,7 +85,7 @@ if (doioctl(fd, VIDIOC_LOG_STATUS, NULL) == 0) { printf("\nStatus Log:\n\n"); len = klogctl(3, buf, sizeof(buf) - 1); -@@ -3514,6 +3534,7 @@ +@@ -3514,6 +3552,7 @@ int main(int argc, char **argv) } } } |