FelipeMdeO commented on code in PR #3532:
URL: https://github.com/apache/nuttx-apps/pull/3532#discussion_r3408484191
##########
netutils/dropbear/port/nuttx_config.h:
##########
@@ -0,0 +1,139 @@
+/****************************************************************************
+ * apps/netutils/dropbear/port/nuttx_config.h
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ ****************************************************************************/
+
+#ifndef __APPS_NETUTILS_DROPBEAR_PORT_NUTTX_CONFIG_H
+#define __APPS_NETUTILS_DROPBEAR_PORT_NUTTX_CONFIG_H
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include <nuttx/config.h>
+
+#include <sys/types.h>
+#include <grp.h>
+#include <pwd.h>
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+#define DROPBEAR_SERVER 1
+#define BUNDLED_LIBTOM 1
+
+#define DISABLE_LASTLOG 1
+#define DISABLE_PAM 1
+#define DISABLE_PUTUTLINE 1
+#define DISABLE_PUTUTXLINE 1
+#define DISABLE_SYSLOG 1
+#define DISABLE_UTMP 1
+#define DISABLE_UTMPX 1
+#define DISABLE_WTMP 1
+#define DISABLE_WTMPX 1
+#define DISABLE_ZLIB 1
+
+#define DROPBEAR_FUZZ 0
+#define DROPBEAR_PLUGIN 0
+
+#define HAVE_BASENAME 1
+#define HAVE_CLOCK_GETTIME 1
+#define HAVE_CONST_GAI_STRERROR_PROTO 1
+#define HAVE_CRYPT 1
+#define HAVE_DECL_HTOLE64 1
+#define HAVE_ENDIAN_H 1
+#define HAVE_EXPLICIT_BZERO 1
+#define HAVE_FREEADDRINFO 1
+#define HAVE_GAI_STRERROR 1
+#define HAVE_GETADDRINFO 1
+#define HAVE_GETNAMEINFO 1
+#define HAVE_GETRANDOM 1
+#define HAVE_GETUSERSHELL 1
+#define HAVE_INTTYPES_H 1
+#define HAVE_LIBGEN_H 1
+#define HAVE_NETDB_H 1
+#define HAVE_NETINET_IN_H 1
+#define HAVE_NETINET_TCP_H 1
+#define HAVE_PATHS_H 1
+#define HAVE_PUTENV 1
+#define HAVE_STATIC_ASSERT 1
+#define HAVE_STDINT_H 1
+#define HAVE_STDIO_H 1
+#define HAVE_STDLIB_H 1
+#define HAVE_STRINGS_H 1
+#define HAVE_STRING_H 1
+#define HAVE_STRLCAT 1
+#define HAVE_STRLCPY 1
+#define HAVE_STRUCT_ADDRINFO 1
+#define HAVE_STRUCT_IN6_ADDR 1
+#define HAVE_STRUCT_SOCKADDR_IN6 1
+#define HAVE_STRUCT_SOCKADDR_STORAGE 1
+#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
Review Comment:
About HAVE_STRUCT_SOCKADDR_IN6:
The `fake-rfc2553.h` dropbear file has the source code below:
```
#ifndef HAVE_STRUCT_IN6_ADDR
struct in6_addr {
u_int8_t s6_addr[16];
};
#endif /* !HAVE_STRUCT_IN6_ADDR */
```
The issue is that the nuttx has the same struct in6_addr, so I need
"disable" this code sector to be able compile.
Look NuttX file `netinet/in.h`, it always define s6_addr:
```
#define s6_addr in6_u.u6_addr8
#define s6_addr16 in6_u.u6_addr16
#define s6_addr32 in6_u.u6_addr32
```
I am using this macro equal 1 because s6_addr always exist in nuttx.
--
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]