Patches added to fix compilation
Portability fixes to correct includes and fix up structure sizes to fix with NetBSD
This commit is contained in:
parent
5a5231f3ae
commit
e833ec25e7
4
motion/DESCR
Normal file
4
motion/DESCR
Normal file
|
@ -0,0 +1,4 @@
|
|||
Motion is a program that monitors the video signal from one or more cameras and
|
||||
is able to detect if a significant part of the picture has changed. Motion can
|
||||
output either image files of the picture frames containing motion or movie files
|
||||
showing the entire event. It can also invoke other programs when motion is seen.
|
19
motion/PLIST
19
motion/PLIST
|
@ -1 +1,20 @@
|
|||
@comment $NetBSD$
|
||||
bin/motion
|
||||
etc/motion/motion-dist.conf
|
||||
man/man1/motion.1
|
||||
share/doc/motion/CHANGELOG
|
||||
share/doc/motion/COPYING
|
||||
share/doc/motion/CREDITS
|
||||
share/doc/motion/README.md
|
||||
share/doc/motion/mask1.png
|
||||
share/doc/motion/motion_guide.html
|
||||
share/doc/motion/normal.jpg
|
||||
share/doc/motion/outputmotion1.jpg
|
||||
share/doc/motion/outputnormal1.jpg
|
||||
share/motion/examples/camera1-dist.conf
|
||||
share/motion/examples/camera2-dist.conf
|
||||
share/motion/examples/camera3-dist.conf
|
||||
share/motion/examples/camera4-dist.conf
|
||||
share/motion/examples/motion-dist.conf
|
||||
share/motion/examples/motion.init-FreeBSD.sh
|
||||
share/motion/examples/motion.service
|
||||
|
|
|
@ -1 +1,5 @@
|
|||
track.c:9:29: fatal error: linux/videodev2.h: No such file or directory
|
||||
basic testing with a USB webcam seems to work OK.
|
||||
|
||||
Needs testing to see if the Brooktree video cards
|
||||
still work. Also needs the database stuff testing
|
||||
and maybe ome tweaks to PLIST.
|
||||
|
|
|
@ -4,3 +4,6 @@ SHA1 (motion-4.0.1.tar.gz) = 539d399eb1eecd8bac3456ae044da8aa6045bfc4
|
|||
RMD160 (motion-4.0.1.tar.gz) = f684f75a8b55371495466524a85d2c95a93dc827
|
||||
SHA512 (motion-4.0.1.tar.gz) = 6ccde3890e6af56f28208321987dd1b9d62a55bbe7cbc3ab5600263602e6e8f47589392c2f3a3a6cb54f927ee76aea94d0e83f26ce8e4047890c891b6c2f8976
|
||||
Size (motion-4.0.1.tar.gz) = 444779 bytes
|
||||
SHA1 (patch-stream.c) = 059344a6e901690f31e18d6d1bea5fb4a873b0c1
|
||||
SHA1 (patch-track.c) = 8bce673e68b42b62aee935ea4df38641227e6dc3
|
||||
SHA1 (patch-video2.c) = 2c441a30fa6eef1011fd4779dc023460746a893a
|
||||
|
|
15
motion/patches/patch-stream.c
Normal file
15
motion/patches/patch-stream.c
Normal file
|
@ -0,0 +1,15 @@
|
|||
$NetBSD$
|
||||
|
||||
portability: bind expects length to match appropriate sockaddr structure
|
||||
|
||||
--- stream.c.orig 2017-06-10 16:56:20.000000000 +0100
|
||||
+++ stream.c 2017-06-10 16:56:47.000000000 +0100
|
||||
@@ -752,7 +752,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
- if (bind(sd, (struct sockaddr*)&sin, sizeof(sin)) != 0) {
|
||||
+ if (bind(sd, (struct sockaddr*)&sin, (ipv6_enabled?sizeof(struct sockaddr_in6):sizeof(struct sockaddr_in))) != 0) {
|
||||
MOTION_LOG(NTC, TYPE_STREAM, NO_ERRNO, "%s: error binding on %s port %d", addr_str, port);
|
||||
close(sd);
|
||||
return -1;
|
18
motion/patches/patch-track.c
Normal file
18
motion/patches/patch-track.c
Normal file
|
@ -0,0 +1,18 @@
|
|||
$NetBSD$
|
||||
|
||||
Portability: not fixed up by configure
|
||||
|
||||
--- track.c.orig 2016-10-25 02:39:24.000000000 +0100
|
||||
+++ track.c 2017-06-10 17:55:31.000000000 +0100
|
||||
@@ -6,7 +6,11 @@
|
||||
* This program is published under the GNU Public license
|
||||
*/
|
||||
#ifdef MOTION_V4L2
|
||||
+#ifdef __NetBSD__
|
||||
+#include <sys/videoio.h>
|
||||
+#else
|
||||
#include <linux/videodev2.h>
|
||||
+#endif /* __NetBSD__ */
|
||||
#endif /* MOTION_V4L2 */
|
||||
#include <math.h>
|
||||
#include "motion.h"
|
15
motion/patches/patch-video2.c
Normal file
15
motion/patches/patch-video2.c
Normal file
|
@ -0,0 +1,15 @@
|
|||
$NetBSD$
|
||||
|
||||
Portability: Fix defination to match ioctl
|
||||
|
||||
--- video2.c.orig 2016-10-25 02:39:24.000000000 +0100
|
||||
+++ video2.c 2017-06-10 15:28:04.000000000 +0100
|
||||
@@ -184,7 +184,7 @@
|
||||
/**
|
||||
* xioctl
|
||||
*/
|
||||
-#ifdef __OpenBSD__
|
||||
+#if defined(__OpenBSD__) || defined(__NetBSD__)
|
||||
static int xioctl(src_v4l2_t *vid_source, unsigned long request, void *arg)
|
||||
#else
|
||||
static int xioctl(src_v4l2_t *vid_source, int request, void *arg)
|
Loading…
Reference in a new issue