pick: Update from 2.0.1 to 2.0.2
[termux-packages] / packages / tsocks / 01_symbolexport.patch
1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 01_symbolexport.dpatch by Nico Golde <nion@debian.org>
3 ##
4 ## All lines beginning with `## DP:' are a description of the patch.
5 ## DP: No description.
6
7 --- a/common.c
8 +++ b/common.c
9 @@ -25,7 +25,8 @@ char logfilename[256]; /* Name of fil
10 FILE *logfile = NULL; /* File to which messages should be logged */
11 int logstamp = 0; /* Timestamp (and pid stamp) messages */
12
13 -unsigned int resolve_ip(char *host, int showmsg, int allownames) {
14 +unsigned int __attribute__ ((visibility ("hidden")))
15 +resolve_ip(char *host, int showmsg, int allownames) {
16 struct hostent *new;
17 unsigned int hostaddr;
18 struct in_addr *ip;
19 @@ -64,7 +65,8 @@ unsigned int resolve_ip(char *host, int
20 /* be logged instead of to standard error */
21 /* timestamp - This indicates that messages should be prefixed */
22 /* with timestamps (and the process id) */
23 -void set_log_options(int level, char *filename, int timestamp) {
24 +void __attribute__ ((visibility ("hidden")))
25 +set_log_options(int level, char *filename, int timestamp) {
26
27 loglevel = level;
28 if (loglevel < MSGERR)
29 @@ -78,7 +80,8 @@ void set_log_options(int level, char *fi
30 logstamp = timestamp;
31 }
32
33 -void show_msg(int level, char *fmt, ...) {
34 +void __attribute__ ((visibility ("hidden")))
35 +show_msg(int level, char *fmt, ...) {
36 va_list ap;
37 int saveerr;
38 extern char *progname;
39 --- a/parser.c
40 +++ b/parser.c
41 @@ -36,7 +36,8 @@ static int handle_defuser(struct parsedf
42 static int handle_defpass(struct parsedfile *, int, char *);
43 static int make_netent(char *value, struct netent **ent);
44
45 -int read_config (char *filename, struct parsedfile *config) {
46 +int __attribute__ ((visibility ("hidden")))
47 +read_config (char *filename, struct parsedfile *config) {
48 FILE *conf;
49 char line[MAXLINE];
50 int rc = 0;
51 @@ -579,7 +580,8 @@ int make_netent(char *value, struct nete
52 return(0);
53 }
54
55 -int is_local(struct parsedfile *config, struct in_addr *testip) {
56 +int __attribute__ ((visibility ("hidden")))
57 +is_local(struct parsedfile *config, struct in_addr *testip) {
58 struct netent *ent;
59
60 for (ent = (config->localnets); ent != NULL; ent = ent -> next) {
61 @@ -593,7 +595,8 @@ int is_local(struct parsedfile *config,
62 }
63
64 /* Find the appropriate server to reach an ip */
65 -int pick_server(struct parsedfile *config, struct serverent **ent,
66 +int __attribute__ ((visibility ("hidden")))
67 +pick_server(struct parsedfile *config, struct serverent **ent,
68 struct in_addr *ip, unsigned int port) {
69 struct netent *net;
70 char ipbuf[64];
71 @@ -637,7 +640,8 @@ int pick_server(struct parsedfile *confi
72 /* the start pointer is set to be NULL. The difference between */
73 /* standard strsep and this function is that this one will */
74 /* set *separator to the character separator found if it isn't null */
75 -char *strsplit(char *separator, char **text, const char *search) {
76 +char __attribute__ ((visibility ("hidden")))
77 +*strsplit(char *separator, char **text, const char *search) {
78 int len;
79 char *ret;
80