git: 56ca26b6882f - main - ftp/axel: Fix build on some systems due to the conflict with if_t symbol
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 22 Jan 2023 20:33:09 UTC
The branch main has been updated by yuri:
URL: https://cgit.FreeBSD.org/ports/commit/?id=56ca26b6882feb87c3132fd0448cdb633aa1a679
commit 56ca26b6882feb87c3132fd0448cdb633aa1a679
Author: Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2023-01-22 20:32:07 +0000
Commit: Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2023-01-22 20:33:00 +0000
ftp/axel: Fix build on some systems due to the conflict with if_t symbol
Reported by: fallout
---
ftp/axel/files/patch-src_axel.h | 13 ++++++++++
ftp/axel/files/patch-src_conf.c | 54 +++++++++++++++++++++++++++++++++++++++++
ftp/axel/files/patch-src_conf.h | 13 ++++++++++
3 files changed, 80 insertions(+)
diff --git a/ftp/axel/files/patch-src_axel.h b/ftp/axel/files/patch-src_axel.h
new file mode 100644
index 000000000000..c9133dda974d
--- /dev/null
+++ b/ftp/axel/files/patch-src_axel.h
@@ -0,0 +1,13 @@
+- workaround for https://github.com/axel-download-accelerator/axel/issues/399
+
+--- src/axel.h.orig 2023-01-22 20:28:34 UTC
++++ src/axel.h
+@@ -101,7 +101,7 @@ typedef struct {
+ } message_t;
+
+ typedef message_t url_t;
+-typedef message_t if_t;
++typedef message_t if_t_;
+
+ #include "abuf.h"
+ #include "conf.h"
diff --git a/ftp/axel/files/patch-src_conf.c b/ftp/axel/files/patch-src_conf.c
new file mode 100644
index 000000000000..aa1cd6d9f9e7
--- /dev/null
+++ b/ftp/axel/files/patch-src_conf.c
@@ -0,0 +1,54 @@
+- workaround for https://github.com/axel-download-accelerator/axel/issues/399
+
+--- src/conf.c.orig 2023-01-22 20:28:48 UTC
++++ src/conf.c
+@@ -276,7 +276,7 @@ conf_init(conf_t *conf)
+ "User-Agent", DEFAULT_USER_AGENT);
+ conf->add_header_count = HDR_count_init;
+
+- conf->interfaces = calloc(1, sizeof(if_t));
++ conf->interfaces = calloc(1, sizeof(if_t_));
+ if (!conf->interfaces)
+ return 0;
+
+@@ -329,11 +329,11 @@ int
+ parse_interfaces(conf_t *conf, char *s)
+ {
+ char *s2;
+- if_t *iface;
++ if_t_ *iface;
+
+ iface = conf->interfaces->next;
+ while (iface != conf->interfaces) {
+- if_t *i;
++ if_t_ *i;
+
+ i = iface->next;
+ free(iface);
+@@ -342,7 +342,7 @@ parse_interfaces(conf_t *conf, char *s)
+ free(conf->interfaces);
+
+ if (!*s) {
+- conf->interfaces = calloc(1, sizeof(if_t));
++ conf->interfaces = calloc(1, sizeof(if_t_));
+ if (!conf->interfaces)
+ return 0;
+
+@@ -350,7 +350,7 @@ parse_interfaces(conf_t *conf, char *s)
+ return 1;
+ }
+
+- conf->interfaces = iface = malloc(sizeof(if_t));
++ conf->interfaces = iface = malloc(sizeof(if_t_));
+ if (!conf->interfaces)
+ return 0;
+
+@@ -365,7 +365,7 @@ parse_interfaces(conf_t *conf, char *s)
+ strlcpy(iface->text, s, sizeof(iface->text));
+ s = s2 + 1;
+ if (*s) {
+- iface->next = malloc(sizeof(if_t));
++ iface->next = malloc(sizeof(if_t_));
+ if (!iface->next)
+ return 0;
+
diff --git a/ftp/axel/files/patch-src_conf.h b/ftp/axel/files/patch-src_conf.h
new file mode 100644
index 000000000000..fc8be24b838b
--- /dev/null
+++ b/ftp/axel/files/patch-src_conf.h
@@ -0,0 +1,13 @@
+- workaround for https://github.com/axel-download-accelerator/axel/issues/399
+
+--- src/conf.h.orig 2023-01-22 20:27:54 UTC
++++ src/conf.h
+@@ -65,7 +65,7 @@ typedef struct {
+ AXEL_PROGRESS_STYLE_PERCENTAGE,
+ } progress_style;
+
+- if_t *interfaces;
++ if_t_ *interfaces;
+
+ sa_family_t ai_family;
+