GNOME Bugzilla – Bug 751221
motioncells: Fix the build on FreeBSD
Last modified: 2015-06-22 19:56:33 UTC
On FreeBSD the opencv plugin doesn't build because the struct of timeval is unknown. CC libgstopencv_la-gstopencv.lo In file included from gstopencv.c:35: ./gstmotioncells.h:109:18: error: field has incomplete type 'struct timeval' struct timeval tv; ^ ./gstmotioncells.h:109:10: note: forward declaration of 'struct timeval' struct timeval tv; ^ 1 error generated.
Created attachment 305696 [details] [review] Add sys/time.h I'm not sure if the #ifdef lines are needed, but since configure checks for the present of sys/time.h, I thoughed it might be a good idea.
Review of attachment 305696 [details] [review]: Thanks for the patch. I think we should just use GTimeVal. It's a compatible definition foundin GLib (hence always included by GStreamer).
Comment on attachment 305696 [details] [review] Add sys/time.h Yes, what Nicolas said
Created attachment 305854 [details] [review] motioncells: Port to g_get_current_time This is more portable.
Attachment 305854 [details] pushed as 55a5c5f - motioncells: Port to g_get_current_time
Comment on attachment 305854 [details] [review] motioncells: Port to g_get_current_time commit 55a5c5f7df7ef37a2924b23337687bbc83cb7744 Author: Nicolas Dufresne <nicolas.dufresne@collabora.co.uk> Date: Mon Jun 22 15:47:18 2015 -0400 motioncells: Port to g_get_current_time