Skip to content

apple macOS/windows and ios/android build error #175

@calvin2021y

Description

@calvin2021y

for macOSX:

r3/src/node.c:978:48: error: no member named '__in6_u' in 'struct in6_addr'
  978 |             unsigned int r2_addr = ntohl(addr6.__in6_u.__u6_addr32[i]);
      |                                          ~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_endian.h:136:46: note: expanded from macro 'ntohl'
  136 | #define ntohl(x)        __DARWIN_OSSwapInt32(x)
      |                                              ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/libkern/_OSByteOrder.h:88:27: note: expanded from macro '__DARWIN_OSSwapInt32'
   88 |     (__builtin_constant_p(x) ? __DARWIN_OSSwapConstInt32(x) : _OSSwapInt32(x))
      |                           ^
r3/src/node.c:978:48: error: no member named '__in6_u' in 'struct in6_addr'
  [ 75%] Building C object src/CMakeFiles/r3.dir/str.c.o
978 |             unsigned int r2_addr = ntohl(addr6.__in6_u.__u6_addr32[i]);
      |                                          ~~~~~ ^

windows:

/r3/src/node.c:7:10: fatal error: 'netinet/in.h' file not found
    7 | #include <netinet/in.h>
      |          ^~~~~~~~~~~~~~
/r3/src/slug.c:141:124: warning: format specifies type 'long' but the argument has type 'long long' [-Wformat]
  141 |             int r = asprintf(&err, "Incomplete slug pattern. PATH (%d): '%s', OFFSET: %ld, STATE: %d", needle_len, needle, p - needle, state);
      |                                                                                       ~~~                                  ^~~~~~~~~~
      |                                                                                       %lld
/r3/src/slug.c:180:120: warning: format specifies type 'long' but the argument has type 'long long' [-Wformat]
  180 |             int r = asprintf(&err, "Incomplete slug pattern. PATTERN (%d): '%s', OFFSET: %ld, STATE: %d", len, needle, p - needle, state);
      |                                                                                          ~~~                           ^~~~~~~~~~
      |                                                                                          %lld
/r3/src/str.c:193:16: error: call to undeclared function 'strndup'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
  193 |         return strndup(str,len);

android:

      |                                                                         %zu
r3/src/node.c:978:48: error: no member named '__in6_u' in 'struct in6_addr'; did you mean 'in6_u'?
  978 |             unsigned int r2_addr = ntohl(addr6.__in6_u.__u6_addr32[i]);
      |                                                ^~~~~~~
      |                                                in6_u

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions