llfio icon indicating copy to clipboard operation
llfio copied to clipboard

Win32 / Clang-14 / libc++: error: use of undeclared identifier 'in6addr_loopback'

Open jcelerier opened this issue 3 years ago • 6 comments

I'm getting a few issues on this platform, would you know why that may be the case ? Maybe it's an issue with the MinGW API headers ?

In file included from D:/a/1/s/3rdparty/llfio/include/llfio.hpp:1:
In file included from D:/a/1/s/3rdparty/llfio/include/llfio/llfio.hpp:18:
In file included from D:/a/1/s/3rdparty/llfio/include/llfio/v2.0/llfio.hpp:73:
In file included from D:/a/1/s/3rdparty/llfio/include/llfio/v2.0/tls_socket_handle.hpp:28:
In file included from D:/a/1/s/3rdparty/llfio/include/llfio/v2.0/detail/impl/../../byte_socket_handle.hpp:1123:
D:/a/1/s/3rdparty/llfio/include/llfio/v2.0/detail/impl/byte_socket_handle.ipp:56:120: error: use of undeclared identifier 'in6addr_loopback'
    return (is_v4() && 0 == memcmp(ipv4._addr, loopback4, sizeof(ipv4._addr))) || (is_v6() && 0 == memcmp(ipv6._addr, &in6addr_loopback, sizeof(ipv6._addr)));
                                                                                                                       ^
D:/a/1/s/3rdparty/llfio/include/llfio/v2.0/detail/impl/byte_socket_handle.ipp:220:120: error: use of undeclared identifier 'in6addr_any'
  LLFIO_HEADERS_ONLY_MEMFUNC_SPEC address_v6 address_v6::any() noexcept { return address_v6(bytes_type{(const byte *) &in6addr_any, 16}); }
                                                                                                                       ^
D:/a/1/s/3rdparty/llfio/include/llfio/v2.0/detail/impl/byte_socket_handle.ipp:221:125: error: use of undeclared identifier 'in6addr_loopback'
  LLFIO_HEADERS_ONLY_MEMFUNC_SPEC address_v6 address_v6::loopback() noexcept { return address_v6(bytes_type{(const byte *) &in6addr_loopback, 16}); }
                                                                                                                            ^
In file included from D:/a/1/s/build/src/lib/CMakeFiles/score_lib_base.dir/Unity/unity_0_cxx.cxx:139:
In file included from D:/a/1/s/src/lib/score/tools/RecursiveWatch.cpp:24:
In file included from D:/a/1/s/3rdparty/llfio/include/llfio.hpp:1:
In file included from D:/a/1/s/3rdparty/llfio/include/llfio/llfio.hpp:18:
In file included from D:/a/1/s/3rdparty/llfio/include/llfio/v2.0/llfio.hpp:73:
In file included from D:/a/1/s/3rdparty/llfio/include/llfio/v2.0/tls_socket_handle.hpp:28:
In file included from D:/a/1/s/3rdparty/llfio/include/llfio/v2.0/detail/impl/../../byte_socket_handle.hpp:1123:
In file included from D:/a/1/s/3rdparty/llfio/include/llfio/v2.0/detail/impl/byte_socket_handle.ipp:302:
D:/a/1/s/3rdparty/llfio/include/llfio/v2.0/detail/impl/windows/byte_socket_handle.ipp:133:49: error: incompatible pointer types assigning to '::ADDRINFOEXW *' (aka 'addrinfoExW *') from 'struct addrinfoexW *'
        for(auto *p = res; p != nullptr; p = p->ai_next)
                                             ~~~^~~~~~~
D:/a/1/s/3rdparty/llfio/include/llfio/v2.0/detail/impl/windows/byte_socket_handle.ipp:196:9: error: use of undeclared identifier 'GetAddrInfoExCancel'
        GetAddrInfoExCancel(&p->ophandle);
        ^
D:/a/1/s/3rdparty/llfio/include/llfio/v2.0/detail/impl/windows/byte_socket_handle.ipp:232:20: error: use of undeclared identifier 'GetAddrInfoExOverlappedResult'
    auto retcode = GetAddrInfoExOverlappedResult(&self->ol);

jcelerier avatar Jun 20 '22 07:06 jcelerier

TBH I'm surprised LLFIO compiles with mingw. I certainly never test it.

You'll probably need to help me here, is it the case that mingw's headers simply don't define inaddr6_loopback at all?

ned14 avatar Jun 23 '22 13:06 ned14

Sure !

It seems that it is defined in ws2tcpip.h there. I can make a patch that conditonnally adds it. would you be ok with me also adding a mingw CI on Github Actions ?

jcelerier avatar Jun 24 '22 12:06 jcelerier

Yes to both please!

Just to clarify: which mingw do you refer to? I remember the 64 bit one had higher quality than the original one, but that was many years ago and things have probably changed since.

ned14 avatar Jun 29 '22 13:06 ned14

which mingw do you refer to?

mingw-w64 which is indeed the high quality up-to-date one :)

jcelerier avatar Jun 29 '22 20:06 jcelerier

Cool, rock on with that at your convenience.

ned14 avatar Jul 06 '22 16:07 ned14

(I haven't forgotten this, currently this is at the "sending patches to mingw" state in the bugfixing state machine c: )

jcelerier avatar Aug 18 '22 15:08 jcelerier