Bläddra i källkod

fixed malloc.h vs. stdlib.h on FreeBSD

Thorsten Hohmeier 21 år sedan
förälder
incheckning
36920599f7
2 ändrade filer med 17 tillägg och 1 borttagningar
  1. 14 0
      diffstat/diffstat.patch
  2. 3 1
      diffstat/diffstat.spec

+ 14 - 0
diffstat/diffstat.patch

@@ -0,0 +1,14 @@
+Index: diffstat.c
+--- diffstat.c.orig	2004-06-09 16:17:43 +0200
++++ diffstat.c	2004-06-09 16:30:25 +0200
+@@ -118,8 +118,10 @@
+ #ifdef HAVE_MALLOC_H
+ #include <malloc.h>
+ #else
++#ifndef __FreeBSD__
+ extern char *malloc();
+ #endif
++#endif
+ 
+ #ifdef HAVE_GETOPT_H
+ #include <getopt.h>

+ 3 - 1
diffstat/diffstat.spec

@@ -34,10 +34,11 @@ Class:        PLUS
 Group:        Converter
 License:      GPL
 Version:      1.34
-Release:      20040207
+Release:      20040609
 
 #   list of sources
 Source0:      ftp://invisible-island.net/diffstat/diffstat-%{version}.tgz
+Patch0:       diffstat.patch
 
 #   build information
 Prefix:       %{l_prefix}
@@ -61,6 +62,7 @@ AutoReqProv:  no
 
 %prep
     %setup -q
+    %patch -p0
 
 %build
     CC="%{l_cc}" \