ports/lang/squeak/files/patch-unix_plugins_CameraPlugin_sqCamera-linux.c
Alexey Dokuchaev 984457601c - Stagify, sort the knobs, remove excessive whitespace and bogus comments
- Employ USE_GSTREAMER knob instead of depending on libgstreamer.so
- Use consistent separators in patch files (this also deuglifies them)

PR:	192234
2014-07-30 08:03:08 +00:00

36 lines
762 B
C

--- unix/plugins/CameraPlugin/sqCamera-linux.c.orig 2012-07-31 06:59:01.000000000 +0900
+++ unix/plugins/CameraPlugin/sqCamera-linux.c 2012-09-24 14:44:26.000000000 +0900
@@ -45,8 +45,9 @@
#include <sys/ioctl.h>
#include <dlfcn.h>
-#include <asm/types.h> /* for videodev2.h */
-
+#ifdef __FreeBSD__
+#include <libv4l2.h>
+#endif
#include <linux/videodev2.h>
@@ -176,12 +177,19 @@
int devNum;
camPtr cam;
+#ifndef __FreeBSD__
vd_open = open;
vd_close = close;
- vd_dup = dup;
+ vd_mmap = mmap;
vd_ioctl = ioctl;
+#else
+ vd_open = v4l2_open;
+ vd_close = v4l2_close;
+ vd_mmap = v4l2_mmap;
+ vd_ioctl = v4l2_ioctl;
+#endif
+ vd_dup = dup;
vd_read = read;
- vd_mmap = mmap;
vd_munmap = munmap;
/* Use libv4l2: use if available... */