resolving compilation issues

This commit is contained in:
Vladimir Dubrovin committed 2014-04-14 23:58:11 +04:00
1 parent 1b5fb4e8d4
commit 17835c4d66
3 files changed
+20 -16

No files matched your search

+4 -3
View File
@@ -9,6 +9,7 @@
#include "proxy.h" #include "proxy.h"
#ifndef _WIN32 #ifndef _WIN32
#include <sys/resource.h>
#ifndef NOPLUGINS #ifndef NOPLUGINS
#include <dlfcn.h> #include <dlfcn.h>
#endif #endif
@@ -644,7 +645,7 @@ static int h_proxy(int argc, unsigned char ** argv){
childdef.isudp = 0; childdef.isudp = 0;
childdef.service = S_PROXY; childdef.service = S_PROXY;
childdef.helpmessage = " -n - no NTLM support\n"; childdef.helpmessage = " -n - no NTLM support\n";
if(!resolvfunc || (resolvfunc == myresolver && !dns_table->hashsize)){ if(!resolvfunc || (resolvfunc == myresolver && !dns_table.hashsize)){
fprintf(stderr, "[line %d] Warning: no nserver/nscache configured, proxy may run very slow\n", linenum); fprintf(stderr, "[line %d] Warning: no nserver/nscache configured, proxy may run very slow\n", linenum);
} }
} }
@@ -675,7 +676,7 @@ static int h_proxy(int argc, unsigned char ** argv){
childdef.isudp = 0; childdef.isudp = 0;
childdef.service = S_SOCKS; childdef.service = S_SOCKS;
childdef.helpmessage = " -n - no NTLM support\n"; childdef.helpmessage = " -n - no NTLM support\n";
if(!resolvfunc || (resolvfunc == myresolver && !dns_table->hashsize)){ if(!resolvfunc || (resolvfunc == myresolver && !dns_table.hashsize)){
fprintf(stderr, "[line %d] Warning: no nserver/nscache configured, socks may run very slow\n", linenum); fprintf(stderr, "[line %d] Warning: no nserver/nscache configured, socks may run very slow\n", linenum);
} }
} }
@@ -718,7 +719,7 @@ static int h_proxy(int argc, unsigned char ** argv){
childdef.port = 53; childdef.port = 53;
childdef.isudp = 1; childdef.isudp = 1;
childdef.service = S_DNSPR; childdef.service = S_DNSPR;
if(!resolvfunc || (resolvfunc == myresolver && !dns_table->hashsize) || resolvfunc == fake_resolver){ if(!resolvfunc || (resolvfunc == myresolver && !dns_table.hashsize) || resolvfunc == fakeresolver){
fprintf(stderr, "[line %d] Warning: no nserver/nscache configured, dnspr will not work as expected\n", linenum); fprintf(stderr, "[line %d] Warning: no nserver/nscache configured, dnspr will not work as expected\n", linenum);
} }
} }
-13
View File
@@ -865,19 +865,6 @@ struct auth authfuncs[] = {
}; };
struct hashentry {
unsigned char hash[sizeof(unsigned)*4];
unsigned long value;
time_t expires;
struct hashentry *next;
};
struct hashtable {
unsigned hashsize;
struct hashentry ** hashtable;
struct hashentry * hashvalues;
struct hashentry * hashempty;
};
struct hashtable dns_table = {0, NULL, NULL, NULL}; struct hashtable dns_table = {0, NULL, NULL, NULL};
+16
View File
@@ -530,6 +530,22 @@ struct child {
unsigned char **argv; unsigned char **argv;
}; };
struct hashentry {
unsigned char hash[sizeof(unsigned)*4];
unsigned long value;
time_t expires;
struct hashentry *next;
};
struct hashtable {
unsigned hashsize;
struct hashentry ** hashtable;
struct hashentry * hashvalues;
struct hashentry * hashempty;
};
extern struct hashtable dns_table;
struct sockfuncs { struct sockfuncs {
#ifdef _WIN32 #ifdef _WIN32
SOCKET (WINAPI *_socket)(int domain, int type, int protocol); SOCKET (WINAPI *_socket)(int domain, int type, int protocol);