ugly workarounds are reverted; forced macro satosin(x) undef'ed; added a new configure file path for haiku
parent
e706ca0bc7
commit
5c8de78c79
2
README
2
README
|
@ -16,7 +16,7 @@ ProxyChains-NG ver 4.14 README
|
|||
If your program doesn't work with proxychains, consider using an
|
||||
iptables based solution instead; this is much more robust.
|
||||
|
||||
Supported Platforms: Linux, BSD, Mac.
|
||||
Supported Platforms: Linux, BSD, Mac, Haiku.
|
||||
|
||||
|
||||
*********** ATTENTION ***********
|
||||
|
|
11
src/common.c
11
src/common.c
|
@ -74,11 +74,14 @@ char *get_config_path(char* default_path, char* pbuf, size_t bufsize) {
|
|||
|
||||
// priority 3; $HOME/.proxychains/proxychains.conf
|
||||
path = getenv("HOME");
|
||||
#ifdef IS_HAIKU
|
||||
snprintf(pbuf, bufsize, "%s/config/settings/%s", path, PROXYCHAINS_CONF_FILE);
|
||||
#else
|
||||
snprintf(pbuf, bufsize, "%s/.proxychains/%s", path, PROXYCHAINS_CONF_FILE);
|
||||
#endif
|
||||
path = pbuf;
|
||||
if(check_path(path))
|
||||
goto have;
|
||||
|
||||
// priority 3b: ~/config/settings/proxychains.conf (for haiku)
|
||||
path = getenv("HOME");
|
||||
snprintf(pbuf, bufsize, "%s/config/settings/%s", path, PROXYCHAINS_CONF_FILE);
|
||||
path = pbuf;
|
||||
if(check_path(path))
|
||||
goto have;
|
||||
|
|
|
@ -38,10 +38,7 @@
|
|||
#include "core.h"
|
||||
#include "common.h"
|
||||
|
||||
#ifdef IS_HAIKU
|
||||
#undef satosin // to prevent macro redefinition
|
||||
#endif
|
||||
|
||||
#undef satosin
|
||||
#define satosin(x) ((struct sockaddr_in *) &(x))
|
||||
#define SOCKADDR(x) (satosin(x)->sin_addr.s_addr)
|
||||
#define SOCKADDR_2(x) (satosin(x)->sin_addr)
|
||||
|
@ -686,13 +683,7 @@ int pc_getnameinfo(const struct sockaddr *sa, socklen_t salen,
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef IS_HAIKU
|
||||
struct hostent *gethostbyaddr(const char *address, socklen_t length, int type) {
|
||||
socklen_t len = length;
|
||||
const char* addr = address;
|
||||
#else
|
||||
struct hostent *gethostbyaddr(const void *addr, socklen_t len, int type) {
|
||||
#endif
|
||||
INIT();
|
||||
PDEBUG("TODO: proper gethostbyaddr hook\n");
|
||||
|
||||
|
|
Loading…
Reference in New Issue