fix build with gcc2.95

This commit is contained in:
naddy 2004-04-16 15:08:24 +00:00
parent 25989f293a
commit c61ce26319
2 changed files with 51 additions and 0 deletions

View File

@ -0,0 +1,31 @@
$OpenBSD: patch-camlibs_aox_aox_c,v 1.1 2004/04/16 15:08:24 naddy Exp $
--- camlibs/aox/aox.c.orig 2004-04-16 16:51:46.000000000 +0200
+++ camlibs/aox/aox.c 2004-04-16 16:53:41.000000000 +0200
@@ -39,10 +39,10 @@
int aox_init (GPPort *port, Model *model, Info *info)
{
unsigned char c[4];
- memset(c,0,sizeof(c));
unsigned char hi[2];
- memset (hi,0,2);
unsigned char lo[2];
+ memset(c,0,sizeof(c));
+ memset (hi,0,2);
memset (lo,0,2);
GP_DEBUG("Running aox_init\n");
@@ -86,11 +86,11 @@ int aox_get_num_hi_pics (Info *info
int aox_get_picture_size (GPPort *port, int lo, int hi, int n, int k)
{
- GP_DEBUG("Running aox_get_picture_size\n");
-
unsigned char c[4];
- memset (c,0,4);
unsigned int size;
+ memset (c,0,4);
+
+ GP_DEBUG("Running aox_get_picture_size\n");
if ( ( (lo) && ( n ==k ) && (k ==0)) ) {
READ(port, 0x04, 0x1, 0x1, c, 2);

View File

@ -0,0 +1,20 @@
$OpenBSD: patch-camlibs_aox_library_c,v 1.1 2004/04/16 15:08:24 naddy Exp $
--- camlibs/aox/library.c.orig 2004-04-16 16:33:42.000000000 +0200
+++ camlibs/aox/library.c 2004-04-16 16:34:19.000000000 +0200
@@ -168,6 +168,7 @@ get_file_func (CameraFilesystem *fs, con
unsigned char *p_data = NULL;
unsigned char *output = NULL;
int len;
+ int header_len;
char header[128];
unsigned char gtable[256];
@@ -222,7 +223,7 @@ get_file_func (CameraFilesystem *fs, con
GP_DEBUG("size of data = %i\n", sizeof(data));
GP_DEBUG("size of p_data = %i\n", sizeof(p_data));
/* And now create a ppm file, with our own header */
- int header_len = snprintf(header, 127,
+ header_len = snprintf(header, 127,
"P6\n"
"# CREATOR: gphoto2, aox library\n"
"%d %d\n"