diff options
Diffstat (limited to 'networking/tftp.c')
-rw-r--r-- | networking/tftp.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/networking/tftp.c b/networking/tftp.c index ad9308e52..e879c4674 100644 --- a/networking/tftp.c +++ b/networking/tftp.c | |||
@@ -51,6 +51,7 @@ | |||
51 | //usage: "\n -l Log to syslog (inetd mode requires this)" | 51 | //usage: "\n -l Log to syslog (inetd mode requires this)" |
52 | 52 | ||
53 | #include "libbb.h" | 53 | #include "libbb.h" |
54 | #include "common_bufsiz.h" | ||
54 | #include <syslog.h> | 55 | #include <syslog.h> |
55 | 56 | ||
56 | #if ENABLE_FEATURE_TFTP_GET || ENABLE_FEATURE_TFTP_PUT | 57 | #if ENABLE_FEATURE_TFTP_GET || ENABLE_FEATURE_TFTP_PUT |
@@ -128,8 +129,9 @@ struct globals { | |||
128 | bb_progress_t pmt; | 129 | bb_progress_t pmt; |
129 | #endif | 130 | #endif |
130 | } FIX_ALIASING; | 131 | } FIX_ALIASING; |
131 | #define G (*(struct globals*)&bb_common_bufsiz1) | 132 | #define G (*(struct globals*)bb_common_bufsiz1) |
132 | #define INIT_G() do { \ | 133 | #define INIT_G() do { \ |
134 | setup_common_bufsiz(); \ | ||
133 | BUILD_BUG_ON(sizeof(G) > COMMON_BUFSIZE); \ | 135 | BUILD_BUG_ON(sizeof(G) > COMMON_BUFSIZE); \ |
134 | } while (0) | 136 | } while (0) |
135 | 137 | ||
@@ -757,7 +759,8 @@ int tftpd_main(int argc UNUSED_PARAM, char **argv) | |||
757 | { | 759 | { |
758 | len_and_sockaddr *our_lsa; | 760 | len_and_sockaddr *our_lsa; |
759 | len_and_sockaddr *peer_lsa; | 761 | len_and_sockaddr *peer_lsa; |
760 | char *local_file, *mode, *user_opt; | 762 | char *mode, *user_opt; |
763 | char *local_file = local_file; | ||
761 | const char *error_msg; | 764 | const char *error_msg; |
762 | int opt, result, opcode; | 765 | int opt, result, opcode; |
763 | IF_FEATURE_TFTP_BLOCKSIZE(int blksize = TFTP_BLKSIZE_DEFAULT;) | 766 | IF_FEATURE_TFTP_BLOCKSIZE(int blksize = TFTP_BLKSIZE_DEFAULT;) |