FelipeMdeO commented on code in PR #3532:
URL: https://github.com/apache/nuttx-apps/pull/3532#discussion_r3447594907
##########
netutils/dropbear/patch/0004-fix-nuttx-compile-warnings.patch:
##########
@@ -0,0 +1,107 @@
+--- a/src/common-kex.c
++++ b/src/common-kex.c
+@@ -117,7 +117,7 @@ void send_msg_kexinit() {
+
+ }
+
+-static void switch_keys() {
++static void switch_keys(void) {
+ TRACE2(("enter switch_keys"))
+ if (!(ses.kexstate.sentkexinit && ses.kexstate.recvkexinit)) {
+ dropbear_exit("Unexpected newkeys message");
+--- a/src/common-session.c
++++ b/src/common-session.c
+@@ -503,7 +503,7 @@ void ignore_recv_response() {
+ TRACE(("Ignored msg_request_response"))
+ }
+
+-static void send_msg_keepalive() {
++static void send_msg_keepalive(void) {
+ time_t old_time_idle = ses.last_packet_time_idle;
+ struct Channel *chan = get_any_ready_channel();
+
+--- a/src/compat.c
++++ b/src/compat.c
+@@ -81,6 +81,10 @@
+
+ #include "includes.h"
+
++#ifdef DROPBEAR_NUTTX
++int setsid(void);
++#endif
++
+ #ifndef HAVE_GETUSERSHELL
+ static char **curshell, **shells, *strings;
+ static char **initshells();
+--- a/src/dbrandom.c
++++ b/src/dbrandom.c
+@@ -129,7 +129,7 @@ static void addrandom(const unsigned char * buf, unsigned
int len) {
+ sha256_done(&hs, hashpool);
+ }
+
+-static void write_urandom()
++static void write_urandom(void)
+ {
+ #if DROPBEAR_FUZZ
+ if (fuzz.fuzzing) {
+--- a/src/dbutil.c
++++ b/src/dbutil.c
+@@ -66,6 +66,10 @@
+ #include "session.h"
+ #include "atomicio.h"
+
++#ifdef DROPBEAR_NUTTX
++int execv(const char *path, char * const argv[]);
++#endif
++
+ #define MAX_FMT 100
+
+ static void generic_dropbear_exit(int exitcode, const char* format,
+--- a/src/packet.c
++++ b/src/packet.c
+@@ -475,7 +475,7 @@ int packet_is_okay_for_queues(unsigned char type) {
+ return 1;
+ }
+
+-static void enqueue_reply_packet() {
++static void enqueue_reply_packet(void) {
+ struct packetlist * new_item = NULL;
+ new_item = m_malloc(sizeof(struct packetlist));
+ new_item->next = NULL;
+--- a/src/svr-runopts.c
++++ b/src/svr-runopts.c
+@@ -38,7 +38,7 @@ svr_runopts svr_opts; /* GLOBAL */
+ static void printhelp(const char * progname);
+ static void addportandaddress(const char* spec);
+ static void loadhostkey(const char *keyfile, int fatal_duplicate);
+ static void addhostkey(const char *keyfile);
+-static void load_banner();
++static void load_banner(void);
+
+ static void printhelp(const char * progname) {
+
+@@ -729,7 +729,7 @@ void load_all_hostkeys() {
+ }
+ }
+
+-static void load_banner() {
++static void load_banner(void) {
+ struct stat buf;
+ if (stat(svr_opts.bannerfile, &buf) != 0) {
+ dropbear_log(LOG_WARNING, "Error opening banner file '%s'",
+--- a/src/svr-tcpfwd.c
++++ b/src/svr-tcpfwd.c
+@@ -53,9 +53,13 @@ void recv_msg_global_request_remotetcp() {
+ /* */
+ #endif /* !DROPBEAR_SVR_REMOTETCPFWD */
+
++#if DROPBEAR_SVR_REMOTETCPFWD
+ static int svr_cancelremotetcp(void);
+ static int svr_remotetcpreq(int *allocated_listen_port);
++#endif
++#if DROPBEAR_SVR_LOCALTCPFWD
+ static int newtcpdirect(struct Channel * channel);
++#endif
Review Comment:
Thank you for highlighting this. I am updating dropbear commit and reduce
patch needs.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]