|
|
@@ -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;
|
|
|
+ }
|