Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports
Path: blob/main/ftp/axel/files/patch-src_conf.c
18157 views
1
- workaround for https://github.com/axel-download-accelerator/axel/issues/399
2
3
--- src/conf.c.orig 2023-01-22 20:28:48 UTC
4
+++ src/conf.c
5
@@ -276,7 +276,7 @@ conf_init(conf_t *conf)
6
"User-Agent", DEFAULT_USER_AGENT);
7
conf->add_header_count = HDR_count_init;
8
9
- conf->interfaces = calloc(1, sizeof(if_t));
10
+ conf->interfaces = calloc(1, sizeof(if_t_));
11
if (!conf->interfaces)
12
return 0;
13
14
@@ -329,11 +329,11 @@ int
15
parse_interfaces(conf_t *conf, char *s)
16
{
17
char *s2;
18
- if_t *iface;
19
+ if_t_ *iface;
20
21
iface = conf->interfaces->next;
22
while (iface != conf->interfaces) {
23
- if_t *i;
24
+ if_t_ *i;
25
26
i = iface->next;
27
free(iface);
28
@@ -342,7 +342,7 @@ parse_interfaces(conf_t *conf, char *s)
29
free(conf->interfaces);
30
31
if (!*s) {
32
- conf->interfaces = calloc(1, sizeof(if_t));
33
+ conf->interfaces = calloc(1, sizeof(if_t_));
34
if (!conf->interfaces)
35
return 0;
36
37
@@ -350,7 +350,7 @@ parse_interfaces(conf_t *conf, char *s)
38
return 1;
39
}
40
41
- conf->interfaces = iface = malloc(sizeof(if_t));
42
+ conf->interfaces = iface = malloc(sizeof(if_t_));
43
if (!conf->interfaces)
44
return 0;
45
46
@@ -365,7 +365,7 @@ parse_interfaces(conf_t *conf, char *s)
47
strlcpy(iface->text, s, sizeof(iface->text));
48
s = s2 + 1;
49
if (*s) {
50
- iface->next = malloc(sizeof(if_t));
51
+ iface->next = malloc(sizeof(if_t_));
52
if (!iface->next)
53
return 0;
54
55
56