pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Package print/magicfilter fails to build - conflicting getline()



Magicfilter uses its own internal implementation of a getline() function. But since it also includes stdio.h it inherits a conflicting definition. As a result, the pacage fails to build.

The attached diff file adds a new patch-ad to the package, which renames the private implementation to my_getline(), thus avoiding the conflict.

-------------------------------------------------------------------------
|   Paul Goyette   | PGP DSS Key fingerprint: |  E-mail addresses:      |
| Customer Service | FA29 0E3B 35AF E8AE 6651 |  paul at whooppee.com   |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer |                          | pgoyette at netbsd.org  |
-------------------------------------------------------------------------
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/print/magicfilter/distinfo,v
retrieving revision 1.5
diff -u -p -r1.5 distinfo
--- distinfo    31 Aug 2006 08:07:00 -0000      1.5
+++ distinfo    17 Oct 2009 14:45:03 -0000
@@ -6,3 +6,4 @@ Size (magicfilter-1.2.tar.gz) = 53176 by
 SHA1 (patch-aa) = 6fe946d6adc7db746c4ff70ed6a946aebf115d5d
 SHA1 (patch-ab) = d55a2db4b9048a41be60c51f651ef0dfcb3f315e
 SHA1 (patch-ac) = eb8aad07704ebe1ab744307523c846827a6afe93
+SHA1 (patch-ad) = 15997d146ce7b64c773e545ba30242ab3ffcd506
Index: patches/patch-ad
===================================================================
RCS file: patches/patch-ad
diff -N patches/patch-ad
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-ad    17 Oct 2009 14:45:03 -0000
@@ -0,0 +1,28 @@
+--- loadconfig.c.orig  2009-10-17 07:41:28.000000000 -0700
++++ loadconfig.c       2009-10-17 07:41:45.000000000 -0700
+@@ -14,14 +14,14 @@
+                   fclose(f); return NULL; } while(0);
+ 
+ /*
+- * char *getline(FILE *f, char *file, int *lineno)
++ * char *my_getline(FILE *f, char *file, int *lineno)
+  *
+  * Get a logical line from file f; returning a pointer to the allocated
+  * storage.  Advance the line pointer by # of lines.  file used for
+  * error messages.
+  */
+ 
+-static char *getline(FILE *f, char *file, int *line)
++static char *my_getline(FILE *f, char *file, int *line)
+ {
+   char *buf, *p;
+   int buflen, spc, ch, bslash;
+@@ -118,7 +118,7 @@
+       return NULL;
+     }
+ 
+-  while ( (line = getline(f, file, &lineno)) != NULL )
++  while ( (line = my_getline(f, file, &lineno)) != NULL )
+     {
+       offset = getoffset(line, &p);
+       


Home | Main Index | Thread Index | Old Index