Browse Source

upgrading package: geoip 0.2.1 -> 0.2.2

master
parent
commit
3e4eb3a496
  1. 61
      geoip/geoip.patch
  2. 13
      geoip/geoip.spec

61
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 <assert.h>
#include <sys/types.h> /* for fstat */
#include <sys/stat.h> /* for fstat */
+#include <unistd.h>
#include "zlib.h"
#include "time.h"
#include <arpa/inet.h>
+#include <netinet/in.h>
#include <sys/socket.h>
#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 <unistd.h>
#include <stdio.h>
+#include <stdlib.h>
+#ifdef __linux__
#include <getopt.h>
+#endif
#include <ctype.h>
#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;
}

13
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

Loading…
Cancel
Save