Bug#678718: unicap: implicit pointer conversions due to missing function prototypes

Adam Conrad adconrad at debian.org
Sun Jun 24 01:00:31 UTC 2012


Attached is a debdiff containing two patches:

1010_libv4l2.h_includes.patch:
  fixes the implicit declarations that directly cause this bug
1011_euvccam_implicit_decls.patch
  fixes the remaining implicit declarations in the source

... Adam

-------------- next part --------------
diff -Nru unicap-0.9.12/debian/changelog unicap-0.9.12/debian/changelog
--- unicap-0.9.12/debian/changelog	2012-06-22 19:25:20.000000000 -0600
+++ unicap-0.9.12/debian/changelog	2012-06-23 18:39:44.000000000 -0600
@@ -1,3 +1,11 @@
+unicap (0.9.12-2) unstable; urgency=low
+
+  * Fix implicit pointer conversions by including libv4l2.h so we
+    have its prototypes available to our macros (closes: #678718)
+  * Fix up more implicit function declarations in cpi/euvccam too.
+
+ -- Adam Conrad <adconrad at debian.org>  Sat, 23 Jun 2012 18:39:04 -0600
+
 unicap (0.9.12-1) unstable; urgency=low
 
   * New upstream release.
diff -Nru unicap-0.9.12/debian/patches/1010_libv4l2.h_includes.patch unicap-0.9.12/debian/patches/1010_libv4l2.h_includes.patch
--- unicap-0.9.12/debian/patches/1010_libv4l2.h_includes.patch	1969-12-31 17:00:00.000000000 -0700
+++ unicap-0.9.12/debian/patches/1010_libv4l2.h_includes.patch	2012-06-23 18:39:56.000000000 -0600
@@ -0,0 +1,47 @@
+Description: Fix implicit pointer conversions in v4l2 macros
+  Fix implicit pointer conversions by including libv4l2.h so we
+  have its prototypes available to our macros (closes: #678718)
+Author: Adam Conrad <adconrad at debian.org>
+Bug-Debian: http://bugs.debian.org/678718
+Forwarded: no
+Last-Update: 2012-06-23
+
+--- unicap-0.9.12.orig/cpi/v4l2cpi/tiseuvccam.c
++++ unicap-0.9.12/cpi/v4l2cpi/tiseuvccam.c
+@@ -28,6 +28,10 @@
+ #define DEBUG
+ #endif
+ 
++#if USE_LIBV4L
++#include <libv4l2.h>
++#endif
++
+ #define TRUE 1
+ 
+ #include "debug.h"
+--- unicap-0.9.12.orig/cpi/v4l2cpi/tisuvccam.c
++++ unicap-0.9.12/cpi/v4l2cpi/tisuvccam.c
+@@ -22,6 +22,10 @@
+ #endif
+ #include "debug.h"
+ 
++#if USE_LIBV4L
++#include <libv4l2.h>
++#endif
++
+ #define N_(x) x
+ 
+ #define FOURCC(a,b,c,d) (unsigned int)((((unsigned int)d)<<24)+(((unsigned int)c)<<16)+(((unsigned int)b)<<8)+a)
+--- unicap-0.9.12.orig/cpi/v4l2cpi/buffermanager.c
++++ unicap-0.9.12/cpi/v4l2cpi/buffermanager.c
+@@ -13,6 +13,10 @@
+ #endif
+ #include "debug.h"
+ 
++#if USE_LIBV4L
++#include <libv4l2.h>
++#endif
++
+ #include "buffermanager.h"
+ 
+ #define MAX_BUFFERS 16
diff -Nru unicap-0.9.12/debian/patches/1011_euvccam_implicit_decls.patch unicap-0.9.12/debian/patches/1011_euvccam_implicit_decls.patch
--- unicap-0.9.12/debian/patches/1011_euvccam_implicit_decls.patch	1969-12-31 17:00:00.000000000 -0700
+++ unicap-0.9.12/debian/patches/1011_euvccam_implicit_decls.patch	2012-06-23 18:54:11.000000000 -0600
@@ -0,0 +1,47 @@
+Description: Fix up implicit function declarations in cpi/euvccam.
+Author: Adam Conrad <adconrad at debian.org>
+Forwarded: no
+Last-Update: 2012-06-23
+
+--- unicap-0.9.12.orig/cpi/euvccam/euvccam_cpi.h
++++ unicap-0.9.12/cpi/euvccam/euvccam_cpi.h
+@@ -35,7 +35,7 @@
+ #include "debug.h"
+ 
+ #include "euvccam_usb.h"
+-
++#include "logging.h"
+ 
+ struct euvccam_handle
+ {
+--- unicap-0.9.12.orig/cpi/euvccam/logging.c
++++ unicap-0.9.12/cpi/euvccam/logging.c
+@@ -21,6 +21,7 @@
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <stdarg.h>
++#include <string.h>
+ 
+ FILE *g_logfp = NULL;
+ int g_log_modules_mask = 0xffff;
+--- unicap-0.9.12.orig/cpi/euvccam/euvccam_usb.c
++++ unicap-0.9.12/cpi/euvccam/euvccam_usb.c
+@@ -26,6 +26,7 @@
+ #include <unicap.h>
+ #include <stdint.h>
+ #include <string.h>
++#include <stdio.h>
+ #include <linux/usbdevice_fs.h>
+ 
+ #include <unicap.h>
+--- unicap-0.9.12.orig/cpi/euvccam/euvccam_colorproc.c
++++ unicap-0.9.12/cpi/euvccam/euvccam_colorproc.c
+@@ -18,6 +18,8 @@
+   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+  */
+ 
++#include <string.h>
++
+ #include "euvccam_cpi.h"
+ #include "debayer.h"
+ 
diff -Nru unicap-0.9.12/debian/patches/series unicap-0.9.12/debian/patches/series
--- unicap-0.9.12/debian/patches/series	2012-06-22 17:13:05.000000000 -0600
+++ unicap-0.9.12/debian/patches/series	2012-06-23 18:53:27.000000000 -0600
@@ -3,3 +3,5 @@
 1005_tidy_gettext.patch
 1006_fix_euvccam_rt_linage.patch
 1009_v4l1.patch
+1010_libv4l2.h_includes.patch
+1011_euvccam_implicit_decls.patch


More information about the pkg-multimedia-maintainers mailing list