diff --git a/log.c b/log.c index cada8db4..74362a64 100644 --- a/log.c +++ b/log.c @@ -60,7 +60,9 @@ static void fprint_timestamp( static void stderr_msg(const char *file, int line, const char *func, int priority, const char *message, const char *appendix) { +#ifndef __ANDROID__ fprint_timestamp(stderr, file, line, func, priority, message, appendix); +#endif } static FILE *logfile = NULL; diff --git a/main.c b/main.c index 06585840..458ee7e4 100644 --- a/main.c +++ b/main.c @@ -32,8 +32,10 @@ extern app_subsys redsocks_subsys; extern app_subsys debug_subsys; extern app_subsys base_subsys; +#ifndef __ANDROID__ extern app_subsys redudp_subsys; extern app_subsys dnstc_subsys; +#endif app_subsys *subsystems[] = { &redsocks_subsys, @@ -41,8 +43,10 @@ app_subsys *subsystems[] = { &debug_subsys, #endif &base_subsys, +#ifndef __ANDROID__ &redudp_subsys, &dnstc_subsys, +#endif }; static const char *confname = "redsocks.conf"; diff --git a/redsocks.c b/redsocks.c index f08cdbc3..6e3a26eb 100644 --- a/redsocks.c +++ b/redsocks.c @@ -1373,7 +1373,7 @@ static int redsocks_init_instance(redsocks_instance *instance) int on = 1; int fd = -1; - fd = socket(AF_INET, SOCK_STREAM, 0); + fd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (fd == -1) { log_errno(LOG_ERR, "socket"); goto fail; diff --git a/version.h b/version.h index 3158c3c4..e2bbe334 100644 --- a/version.h +++ b/version.h @@ -1,6 +1,6 @@ #ifndef VERSION_H_SUN_NOV_27_03_22_30_2011 #define VERSION_H_SUN_NOV_27_03_22_30_2011 -extern const char* redsocks_version; +const char* redsocks_version = "SUN_NOV_27_03_22_30_2011"; #endif // VERSION_H_SUN_NOV_27_03_22_30_2011