zhhyu7 commented on code in PR #9058:
URL: https://github.com/apache/nuttx/pull/9058#discussion_r1173663662


##########
include/netinet/ip.h:
##########
@@ -32,6 +32,33 @@
  * Public Type Definitions
  ****************************************************************************/
 
+#define IPVERSION 4     /* IP version number */
+#define IPDEFTTL  64    /* default ttl, from RFC 1340 */
+
+struct iphdr
+{
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+  unsigned int ihl:4;
+  unsigned int version:4;
+#elif __BYTE_ORDER == __BIG_ENDIAN
+  unsigned int version:4;
+  unsigned int ihl:4;

Review Comment:
   glibc and musl both define this bit fields, so many applications use this 
definition, and if we compile those applications directly in NuttX's 
environment, we will get a compile error. this structure is only for tripartite 
library compatibility and is not used by NuttX itself



-- 
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: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to