From 9ac737ac803c4cd33f975a3b621b0f06d1c01a08 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Wed, 30 Dec 2020 15:11:09 -0800 Subject: [PATCH] atftp: fix compilation with glibc It's defining two functions twice for some reason. Refreshed patches. Signed-off-by: Rosen Penev --- net/atftp/Makefile | 2 +- .../01-missing-u_char-type-patch.patch | 2 -- ...ix-invalid-read-in-tftp_send_request.patch | 4 +--- ...ix-undefined-reference-linker-errors.patch | 19 ++++--------------- net/atftp/patches/04-cdefs.patch | 13 ++++++++----- 5 files changed, 14 insertions(+), 26 deletions(-) diff --git a/net/atftp/Makefile b/net/atftp/Makefile index 5f1d434016..956278be09 100644 --- a/net/atftp/Makefile +++ b/net/atftp/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=atftp PKG_VERSION:=0.7.2 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=@SF/$(PKG_NAME) diff --git a/net/atftp/patches/01-missing-u_char-type-patch.patch b/net/atftp/patches/01-missing-u_char-type-patch.patch index 081f4b37e1..e3d83f22d1 100644 --- a/net/atftp/patches/01-missing-u_char-type-patch.patch +++ b/net/atftp/patches/01-missing-u_char-type-patch.patch @@ -1,5 +1,3 @@ -diff --git a/tftpd.h b/tftpd.h -index 945065e..4c2f214 100644 --- a/tftpd.h +++ b/tftpd.h @@ -46,7 +46,7 @@ struct thread_data { diff --git a/net/atftp/patches/02-fix-invalid-read-in-tftp_send_request.patch b/net/atftp/patches/02-fix-invalid-read-in-tftp_send_request.patch index 679af5cf3f..e1cad03b95 100644 --- a/net/atftp/patches/02-fix-invalid-read-in-tftp_send_request.patch +++ b/net/atftp/patches/02-fix-invalid-read-in-tftp_send_request.patch @@ -1,8 +1,6 @@ -diff --git a/tftp_io.c b/tftp_io.c -index 605a9c2..6cce1f4 100644 --- a/tftp_io.c +++ b/tftp_io.c -@@ -64,7 +64,7 @@ int tftp_send_request(int socket, struct sockaddr_storage *sa, short type, +@@ -64,7 +64,7 @@ int tftp_send_request(int socket, struct buf_index += strlen(mode); buf_index++; diff --git a/net/atftp/patches/03-Fix-undefined-reference-linker-errors.patch b/net/atftp/patches/03-Fix-undefined-reference-linker-errors.patch index c828e1a4c9..82ce8bcdad 100644 --- a/net/atftp/patches/03-Fix-undefined-reference-linker-errors.patch +++ b/net/atftp/patches/03-Fix-undefined-reference-linker-errors.patch @@ -1,8 +1,6 @@ -diff --git a/tftp_def.c b/tftp_def.c -index 96abdc5..16240f7 100644 --- a/tftp_def.c +++ b/tftp_def.c -@@ -141,7 +141,7 @@ int print_eng(double value, char *string, int size, char *format) +@@ -133,7 +133,7 @@ int print_eng(double value, char *string /* * This is a strncpy function that take care of string NULL termination */ @@ -11,11 +9,9 @@ index 96abdc5..16240f7 100644 { strncpy(to, from, size); if (size>0) -diff --git a/tftp_def.h b/tftp_def.h -index e4b338d..4418ee7 100644 --- a/tftp_def.h +++ b/tftp_def.h -@@ -50,7 +50,7 @@ extern char *tftp_errmsg[9]; +@@ -51,7 +51,7 @@ extern char *tftp_errmsg[9]; int timeval_diff(struct timeval *res, struct timeval *t1, struct timeval *t0); int print_eng(double value, char *string, int size, char *format); @@ -24,11 +20,9 @@ index e4b338d..4418ee7 100644 int Gethostbyname(char *addr, struct hostent *host); char *sockaddr_print_addr(const struct sockaddr_storage *, char *, size_t); -diff --git a/tftpd.h b/tftpd.h -index 945065e..4bd3f17 100644 --- a/tftpd.h +++ b/tftpd.h -@@ -93,7 +93,7 @@ int tftpd_list_find_multicast_server_and_add(struct thread_data **thread, +@@ -93,7 +93,7 @@ int tftpd_list_find_multicast_server_and /* * Defined in tftpd_list.c, operation on client structure list. */ @@ -37,11 +31,9 @@ index 945065e..4bd3f17 100644 void tftpd_clientlist_remove(struct thread_data *thread, struct client_info *client); void tftpd_clientlist_free(struct thread_data *thread); -diff --git a/tftpd_list.c b/tftpd_list.c -index f376159..159ffca 100644 --- a/tftpd_list.c +++ b/tftpd_list.c -@@ -201,7 +201,7 @@ int tftpd_list_find_multicast_server_and_add(struct thread_data **thread, +@@ -201,7 +201,7 @@ int tftpd_list_find_multicast_server_and return 0; } @@ -50,6 +42,3 @@ index f376159..159ffca 100644 { pthread_mutex_lock(&thread->client_mutex); thread->client_ready = 1; --- -2.1.4 - diff --git a/net/atftp/patches/04-cdefs.patch b/net/atftp/patches/04-cdefs.patch index 8968045ffe..ffb642d61b 100644 --- a/net/atftp/patches/04-cdefs.patch +++ b/net/atftp/patches/04-cdefs.patch @@ -31,7 +31,7 @@ /* Make a '\0' separated arg vector from a SEP separated list in STRING, returning it in ARGZ, and the total length in LEN. If a -@@ -69,65 +68,65 @@ extern error_t argz_create (char *__const __argv[], char **__restrict __argz, +@@ -69,65 +68,65 @@ extern error_t argz_create (char *__cons The result can be destroyed using free. */ extern error_t __argz_create_sep (__const char *__restrict __string, int __sep, char **__restrict __argz, @@ -113,7 +113,7 @@ /* Insert ENTRY into ARGZ & ARGZ_LEN before BEFORE, which should be an existing entry in ARGZ; if BEFORE is NULL, ENTRY is appended to the end. -@@ -138,11 +137,11 @@ extern void argz_delete (char **__restrict __argz, +@@ -138,11 +137,11 @@ extern void argz_delete (char **__restri extern error_t __argz_insert (char **__restrict __argz, size_t *__restrict __argz_len, char *__restrict __before, @@ -127,7 +127,7 @@ /* Replace any occurrences of the string STR in ARGZ with WITH, reallocating ARGZ as necessary. If REPLACE_COUNT is non-zero, *REPLACE_COUNT will be -@@ -173,9 +172,9 @@ extern error_t argz_replace (char **__restrict __argz, +@@ -173,11 +172,11 @@ extern error_t argz_replace (char **__re ...; */ extern char *__argz_next (__const char *__restrict __argz, size_t __argz_len, @@ -137,9 +137,12 @@ - __const char *__restrict __entry) __THROW; + __const char *__restrict __entry) __attribute__ ((__nothrow__)); - #ifdef __USE_EXTERN_INLINES +-#ifdef __USE_EXTERN_INLINES ++#if 0 extern inline char * -@@ -200,6 +199,8 @@ argz_next (__const char *__argz, size_t __argz_len, + __argz_next (__const char *__argz, size_t __argz_len, + __const char *__entry) +@@ -200,6 +199,8 @@ argz_next (__const char *__argz, size_t } #endif /* Use extern inlines. */ -- 2.30.2