File gbuffy-fixes.patch of Package gbuffy

--- gbuffy-0.2.6/msocket.c.xx	2005-05-12 17:42:54.085654617 +0200
+++ gbuffy-0.2.6/msocket.c	2005-05-12 17:42:58.593357690 +0200
@@ -26,6 +26,7 @@
 #include <unistd.h>
 #include <netinet/in.h>
 #include <netdb.h>
+#include <string.h>
 #include <stdlib.h>
 #include <sys/types.h>
 #include <sys/socket.h>
--- gbuffy-0.2.6/lib.c.xx	2005-05-12 17:45:27.302240626 +0200
+++ gbuffy-0.2.6/lib.c	2005-05-12 17:45:55.024590351 +0200
@@ -180,9 +180,11 @@
     offset = buf - line;
     if (*linelen < offset + STRING)
     {
+      void *ptr = line;
       /* grow the buffer */
       *linelen += STRING;
-      safe_realloc ((void **) &line, *linelen);
+      safe_realloc (&ptr, *linelen);
+      line = ptr;
       buf = line + offset;
     }
   }
--- gbuffy-0.2.6/rfc2047.c.xx	2005-05-12 17:46:04.349926699 +0200
+++ gbuffy-0.2.6/rfc2047.c	2005-05-12 17:46:28.528491303 +0200
@@ -56,6 +56,7 @@
   char *pp = p;
   char *pd = d;
   int enc = 0, filter = 0, count = 0, c1, c2, c3, c4;
+  void *ptr;
 
   while ((pp = strtok (pp, "?")) != NULL)
   {
@@ -131,7 +132,8 @@
     }
     pp = 0;
   }
-  safe_free ((void **) &p);
+  ptr = p;
+  safe_free ( &ptr);
   if (filter)
   {
     pd = d;
openSUSE Build Service is sponsored by