Quellcode durchsuchen

atftp: Fix "undefined reference" linker errors.

These errors were caused by using "inline" functions in a non-static context.

Signed-off-by: Daniel Danzberger <daniel@dd-wrt.com>
Daniel Danzberger vor 9 Jahren
Ursprung
Commit
8bc1404ff5

+ 1
- 1
net/atftp/Makefile Datei anzeigen

@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
8 8
 
9 9
 PKG_NAME:=atftp
10 10
 PKG_VERSION:=0.7.1
11
-PKG_RELEASE:=4
11
+PKG_RELEASE:=5
12 12
 PKG_MAINTAINER:=Daniel Danzberger <daniel@dd-wrt.com>
13 13
 PKG_LICENSE:=GPL-2.0
14 14
 

+ 55
- 0
net/atftp/patches/03-Fix-undefined-reference-linker-errors.patch Datei anzeigen

@@ -0,0 +1,55 @@
1
+diff --git a/tftp_def.c b/tftp_def.c
2
+index 96abdc5..16240f7 100644
3
+--- a/tftp_def.c
4
++++ b/tftp_def.c
5
+@@ -141,7 +141,7 @@ int print_eng(double value, char *string, int size, char *format)
6
+ /*
7
+  * This is a strncpy function that take care of string NULL termination
8
+  */
9
+-inline char *Strncpy(char *to, const char *from, size_t size)
10
++char *Strncpy(char *to, const char *from, size_t size)
11
+ {
12
+      strncpy(to, from, size);
13
+      if (size>0) 
14
+diff --git a/tftp_def.h b/tftp_def.h
15
+index e4b338d..4418ee7 100644
16
+--- a/tftp_def.h
17
++++ b/tftp_def.h
18
+@@ -50,7 +50,7 @@ extern char *tftp_errmsg[9];
19
+ 
20
+ int timeval_diff(struct timeval *res, struct timeval *t1, struct timeval *t0);
21
+ int print_eng(double value, char *string, int size, char *format);
22
+-inline char *Strncpy(char *to, const char *from, size_t size);
23
++char *Strncpy(char *to, const char *from, size_t size);
24
+ int Gethostbyname(char *addr, struct hostent *host);
25
+ 
26
+ char *sockaddr_print_addr(const struct sockaddr_storage *, char *, size_t);
27
+diff --git a/tftpd.h b/tftpd.h
28
+index 945065e..4bd3f17 100644
29
+--- a/tftpd.h
30
++++ b/tftpd.h
31
+@@ -93,7 +93,7 @@ int tftpd_list_find_multicast_server_and_add(struct thread_data **thread,
32
+ /*
33
+  * Defined in tftpd_list.c, operation on client structure list.
34
+  */
35
+-inline void tftpd_clientlist_ready(struct thread_data *thread);
36
++void tftpd_clientlist_ready(struct thread_data *thread);
37
+ void tftpd_clientlist_remove(struct thread_data *thread,
38
+                              struct client_info *client);
39
+ void tftpd_clientlist_free(struct thread_data *thread);
40
+diff --git a/tftpd_list.c b/tftpd_list.c
41
+index f376159..159ffca 100644
42
+--- a/tftpd_list.c
43
++++ b/tftpd_list.c
44
+@@ -201,7 +201,7 @@ int tftpd_list_find_multicast_server_and_add(struct thread_data **thread,
45
+      return 0;
46
+ }
47
+ 
48
+-inline void tftpd_clientlist_ready(struct thread_data *thread)
49
++void tftpd_clientlist_ready(struct thread_data *thread)
50
+ {
51
+      pthread_mutex_lock(&thread->client_mutex);
52
+      thread->client_ready = 1;
53
+-- 
54
+2.1.4
55
+