Browse Source

Merge pull request #14379 from neheb/atft

atftp: fix compilation with glibc
lilik-openwrt-22.03
Rosen Penev 4 years ago
committed by GitHub
parent
commit
9a7c519f6e
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 26 deletions
  1. +1
    -1
      net/atftp/Makefile
  2. +0
    -2
      net/atftp/patches/01-missing-u_char-type-patch.patch
  3. +1
    -3
      net/atftp/patches/02-fix-invalid-read-in-tftp_send_request.patch
  4. +4
    -15
      net/atftp/patches/03-Fix-undefined-reference-linker-errors.patch
  5. +8
    -5
      net/atftp/patches/04-cdefs.patch

+ 1
- 1
net/atftp/Makefile View File

@ -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)


+ 0
- 2
net/atftp/patches/01-missing-u_char-type-patch.patch View File

@ -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 {


+ 1
- 3
net/atftp/patches/02-fix-invalid-read-in-tftp_send_request.patch View File

@ -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++;


+ 4
- 15
net/atftp/patches/03-Fix-undefined-reference-linker-errors.patch View File

@ -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

+ 8
- 5
net/atftp/patches/04-cdefs.patch View File

@ -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. */


Loading…
Cancel
Save