nfqws,tpws: remove @config from android

This commit is contained in:
bol-van 2024-11-16 15:19:36 +03:00
parent 667d32a3e7
commit ee44aebcc4
5 changed files with 16 additions and 16 deletions

BIN
nfq/dvtws Normal file

Binary file not shown.

View File

@ -552,7 +552,7 @@ static bool parse_ws_scale_factor(char *s, uint16_t *wsize, uint8_t *wscale)
#ifndef __OpenBSD__ #if !defined( __OpenBSD__) && !defined(__ANDROID__)
static void cleanup_args() static void cleanup_args()
{ {
wordfree(&params.wexp); wordfree(&params.wexp);
@ -561,7 +561,7 @@ static void cleanup_args()
static void cleanup_params(void) static void cleanup_params(void)
{ {
#ifndef __OpenBSD__ #if !defined( __OpenBSD__) && !defined(__ANDROID__)
cleanup_args(); cleanup_args();
#endif #endif
@ -985,7 +985,7 @@ static unsigned int hash_jen(const void *data,unsigned int len)
static void exithelp(void) static void exithelp(void)
{ {
printf( printf(
#ifndef __OpenBSD__ #if !defined( __OpenBSD__) && !defined(__ANDROID__)
" @<config_file>|$<config_file>\t\t\t; read file for options. must be the only argument. other options are ignored.\n\n" " @<config_file>|$<config_file>\t\t\t; read file for options. must be the only argument. other options are ignored.\n\n"
#endif #endif
" --debug=0|1|syslog|@<filename>\n" " --debug=0|1|syslog|@<filename>\n"
@ -1099,7 +1099,7 @@ static void exithelp_clean(void)
exithelp(); exithelp();
} }
#ifndef __OpenBSD__ #if !defined( __OpenBSD__) && !defined(__ANDROID__)
// no static to not allow optimizer to inline this func (save stack) // no static to not allow optimizer to inline this func (save stack)
void config_from_file(const char *filename) void config_from_file(const char *filename)
{ {
@ -1192,7 +1192,7 @@ int main(int argc, char **argv)
} }
#endif #endif
#ifndef __OpenBSD__ #if !defined( __OpenBSD__) && !defined(__ANDROID__)
if (argc>=2 && (argv[1][0]=='@' || argv[1][0]=='$')) if (argc>=2 && (argv[1][0]=='@' || argv[1][0]=='$'))
{ {
config_from_file(argv[1]+1); config_from_file(argv[1]+1);
@ -1963,7 +1963,7 @@ int main(int argc, char **argv)
} }
// do not need args from file anymore // do not need args from file anymore
#ifndef __OpenBSD__ #if !defined( __OpenBSD__) && !defined(__ANDROID__)
cleanup_args(); cleanup_args();
#endif #endif
argv=NULL; argc=0; argv=NULL; argc=0;

View File

@ -14,7 +14,7 @@
#include <stdio.h> #include <stdio.h>
#include <time.h> #include <time.h>
#include <sys/queue.h> #include <sys/queue.h>
#ifndef __OpenBSD__ #if !defined( __OpenBSD__) && !defined(__ANDROID__)
#include <wordexp.h> #include <wordexp.h>
#endif #endif
@ -104,7 +104,7 @@ bool dp_list_have_autohostlist(struct desync_profile_list_head *head);
struct params_s struct params_s
{ {
#ifndef __OpenBSD__ #if !defined( __OpenBSD__) && !defined(__ANDROID__)
wordexp_t wexp; // for file based config wordexp_t wexp; // for file based config
#endif #endif

View File

@ -6,7 +6,7 @@
#include <sys/param.h> #include <sys/param.h>
#include <sys/queue.h> #include <sys/queue.h>
#include <time.h> #include <time.h>
#ifndef __OpenBSD__ #if !defined( __OpenBSD__) && !defined(__ANDROID__)
#include <wordexp.h> #include <wordexp.h>
#endif #endif
@ -85,7 +85,7 @@ void dp_list_destroy(struct desync_profile_list_head *head);
struct params_s struct params_s
{ {
#ifndef __OpenBSD__ #if !defined( __OpenBSD__) && !defined(__ANDROID__)
wordexp_t wexp; // for file based config wordexp_t wexp; // for file based config
#endif #endif

View File

@ -122,7 +122,7 @@ static int get_default_ttl(void)
static void exithelp(void) static void exithelp(void)
{ {
printf( printf(
#ifndef __OpenBSD__ #if !defined( __OpenBSD__) && !defined(__ANDROID__)
" @<config_file>|$<config_file>\t\t; read file for options. must be the only argument. other options are ignored.\n\n" " @<config_file>|$<config_file>\t\t; read file for options. must be the only argument. other options are ignored.\n\n"
#endif #endif
" --bind-addr=<v4_addr>|<v6_addr>\t; for v6 link locals append %%interface_name\n" " --bind-addr=<v4_addr>|<v6_addr>\t; for v6 link locals append %%interface_name\n"
@ -215,7 +215,7 @@ static void exithelp(void)
); );
exit(1); exit(1);
} }
#ifndef __OpenBSD__ #if !defined( __OpenBSD__) && !defined(__ANDROID__)
static void cleanup_args() static void cleanup_args()
{ {
wordfree(&params.wexp); wordfree(&params.wexp);
@ -223,7 +223,7 @@ static void cleanup_args()
#endif #endif
static void cleanup_params(void) static void cleanup_params(void)
{ {
#ifndef __OpenBSD__ #if !defined( __OpenBSD__) && !defined(__ANDROID__)
cleanup_args(); cleanup_args();
#endif #endif
@ -472,7 +472,7 @@ static bool parse_pf_list(char *opt, struct port_filters_head *pfl)
return true; return true;
} }
#ifndef __OpenBSD__ #if !defined( __OpenBSD__) && !defined(__ANDROID__)
// no static to not allow optimizer to inline this func (save stack) // no static to not allow optimizer to inline this func (save stack)
void config_from_file(const char *filename) void config_from_file(const char *filename)
{ {
@ -547,7 +547,7 @@ void parse_params(int argc, char *argv[])
dp = &dpl->dp; dp = &dpl->dp;
dp->n = ++desync_profile_count; dp->n = ++desync_profile_count;
#ifndef __OpenBSD__ #if !defined( __OpenBSD__) && !defined(__ANDROID__)
if (argc>=2 && (argv[1][0]=='@' || argv[1][0]=='$')) if (argc>=2 && (argv[1][0]=='@' || argv[1][0]=='$'))
{ {
config_from_file(argv[1]+1); config_from_file(argv[1]+1);
@ -1288,7 +1288,7 @@ void parse_params(int argc, char *argv[])
SplitDebug(); SplitDebug();
VPRINT("\n"); VPRINT("\n");
#ifndef __OpenBSD__ #if !defined( __OpenBSD__) && !defined(__ANDROID__)
// do not need args from file anymore // do not need args from file anymore
cleanup_args(); cleanup_args();
#endif #endif