From 3e4eb3a496a40015941b158f5e7de21f44b7836b Mon Sep 17 00:00:00 2001 From: "Ralf S. Engelschall" Date: Fri, 19 Jul 2002 08:05:22 +0000 Subject: [PATCH] upgrading package: geoip 0.2.1 -> 0.2.2 --- geoip/geoip.patch | 61 +++++++++++++++++++++++++++++++++++++++++++++++ geoip/geoip.spec | 13 ++++++---- 2 files changed, 70 insertions(+), 4 deletions(-) create mode 100644 geoip/geoip.patch diff --git a/geoip/geoip.patch b/geoip/geoip.patch new file mode 100644 index 0000000000..695f414fc9 --- /dev/null +++ b/geoip/geoip.patch @@ -0,0 +1,61 @@ +--- libGeoIP/GeoIP.c.orig Thu Jul 18 09:40:29 2002 ++++ libGeoIP/GeoIP.c Fri Jul 19 09:51:30 2002 +@@ -28,10 +28,12 @@ + #include + #include /* for fstat */ + #include /* for fstat */ ++#include + #include "zlib.h" + #include "time.h" + + #include ++#include + #include + + #define COUNTRY_BEGIN 16776960; +@@ -236,7 +238,7 @@ + int block_size = 1024; + char * request_uri; + char *uncompr = NULL, *compr; +- ulong comprLen, uncomprLen = 1000000; ++ unsigned long comprLen; + FILE * comp_fh; + gzFile gz_fh, gi_fh; + char * file_path_gz; +@@ -358,7 +360,7 @@ + int i, j; + unsigned int x[2]; + unsigned char buf[2][3]; +- unsigned char *cache_buf; ++ unsigned char *cache_buf = NULL; + + if (depth == -1) { + fprintf(stderr,"Error Traversing Database - Perhaps database is corrupt?\n"); +--- apps/geoipupdate.c.orig Thu Jul 18 09:42:03 2002 ++++ apps/geoipupdate.c Fri Jul 19 10:00:22 2002 +@@ -21,7 +21,10 @@ + #include "GeoIP.h" + #include + #include ++#include ++#ifdef __linux__ + #include ++#endif + #include + + #define LICENSE_KEY "LicenseKey" +@@ -39,7 +42,7 @@ + int line_index = 0; + unsigned char *lineptr = malloc(sizeof(char) * n); + char *a_license_key_str, *a_ptr; +- char *the_license_key_str; ++ char *the_license_key_str = ""; + char c; + int err; + +@@ -128,4 +131,5 @@ + + free(the_license_key_str); + GeoIP_delete(gi); ++ return 0; + } diff --git a/geoip/geoip.spec b/geoip/geoip.spec index 74609b7eff..a9bb603123 100644 --- a/geoip/geoip.spec +++ b/geoip/geoip.spec @@ -32,17 +32,18 @@ Packager: The OpenPKG Project Distribution: OpenPKG [EXP] Group: Network License: GPL -Version: 0.2.1 -Release: 20020704 +Version: 0.2.2 +Release: 20020719 # list of sources Source0: http://maxmind.com/download/geoip/api/c/GeoIP-%{version}.tar.gz +Patch0: geoip.patch # build information Prefix: %{l_prefix} BuildRoot: %{l_buildroot} -BuildPreReq: OpenPKG, openpkg >= 20020206 -PreReq: OpenPKG, openpkg >= 20020206 +BuildPreReq: OpenPKG, openpkg >= 20020206, zlib +PreReq: OpenPKG, openpkg >= 20020206, zlib AutoReq: no AutoReqProv: no @@ -54,10 +55,14 @@ AutoReqProv: no %prep %setup -q -n GeoIP-%{version} + %patch -p0 %build CC="%{l_cc}" \ CFLAGS="%{l_cflags -O}" \ + CPPFLAGS="-I%{l_prefix}/include -D_XOPEN_SOURCE" \ + LDFLAGS="-L%{l_prefix}/lib" \ + LIBS="-lz" \ ./configure \ --prefix=%{l_prefix} \ --disable-shared