File webalizer-static.patch of Package webalizer

Index: webalizer-2.23-08/dns_resolv.c
===================================================================
--- webalizer-2.23-08.orig/dns_resolv.c	2013-02-26 06:37:27.000000000 +0100
+++ webalizer-2.23-08/dns_resolv.c	2020-06-08 10:37:00.206448803 +0200
@@ -80,9 +80,7 @@ struct   dns_child child[MAXCHILD];
 
 DNODEPTR host_table[MAXHASH];                  /* hostname/ip hash table   */
 
-char     buffer[BUFSIZE];                      /* log file record buffer   */
-char     tmp_buf[BUFSIZE];                     /* used to temp save above  */
-struct   utsname system_info;                  /* system info structure    */
+static char     buffer[BUFSIZE];               /* log file record buffer   */
 
 int      raiseSigChild = 1;
 
@@ -244,7 +242,6 @@ int dns_resolver(void *log_fp)
          continue;                        /* go get next record if any    */
       }
 
-      strcpy(tmp_buf, buffer);            /* save buffer in case of error */
       if(parse_record(buffer))            /* parse the record             */
       {
          struct addrinfo hints, *ares;
Index: webalizer-2.23-08/webalizer.c
===================================================================
--- webalizer-2.23-08.orig/webalizer.c	2013-08-26 06:52:15.000000000 +0200
+++ webalizer-2.23-08/webalizer.c	2020-06-08 10:34:04.845481306 +0200
@@ -246,7 +246,7 @@ struct     log_struct log_rec;
 void       *zlog_fp;                          /* compressed logfile ptr   */
 FILE       *log_fp;                           /* regular logfile pointer  */
 
-char       buffer[BUFSIZE];                   /* log file record buffer   */
+static char       buffer[BUFSIZE];            /* log file record buffer   */
 char       tmp_buf[BUFSIZE];                  /* used to temp save above  */
 
 CLISTPTR   *top_ctrys    = NULL;              /* Top countries table      */
Index: webalizer-2.23-08/hashtab.c
===================================================================
--- webalizer-2.23-08.orig/hashtab.c	2013-08-26 06:45:28.000000000 +0200
+++ webalizer-2.23-08/hashtab.c	2020-06-08 10:27:37.043341687 +0200
@@ -84,9 +84,6 @@ RNODEPTR rm_htab[MAXHASH];
 ANODEPTR am_htab[MAXHASH];
 SNODEPTR sr_htab[MAXHASH];                    /* search string table      */
 INODEPTR im_htab[MAXHASH];                    /* ident table (username)   */
-#ifdef USE_DNS
-DNODEPTR host_table[MAXHASH];                 /* DNS hash table           */
-#endif  /* USE_DNS */
 
 /*********************************************/
 /* DEL_HTABS - clear out our hash tables     */
@@ -101,9 +98,6 @@ void del_htabs()
    del_alist(am_htab);
    del_slist(sr_htab);
    del_ilist(im_htab);
-#ifdef USE_DNS
-/* del_dlist(host_table);  */                    /* delete DNS hash table    */
-#endif  /* USE_DNS */
 }
 
 /*********************************************/
Index: webalizer-2.23-08/hashtab.h
===================================================================
--- webalizer-2.23-08.orig/hashtab.h	2008-05-22 10:14:30.000000000 +0200
+++ webalizer-2.23-08/hashtab.h	2020-06-08 10:27:58.507460109 +0200
@@ -73,9 +73,6 @@ extern RNODEPTR rm_htab[MAXHASH];
 extern ANODEPTR am_htab[MAXHASH];
 extern SNODEPTR sr_htab[MAXHASH];             /* search string table       */
 extern INODEPTR im_htab[MAXHASH];             /* ident table (username)    */
-#ifdef USE_DNS
-extern DNODEPTR host_table[MAXHASH];          /* DNS resolver table        */
-#endif
 
 extern int    put_hnode(char *, int, u_int64_t, u_int64_t, double,
                         u_int64_t *, u_int64_t, u_int64_t, char *, HNODEPTR *);
openSUSE Build Service is sponsored by