ned14 / llfio

P1031 low level file i/o and filesystem library for the C++ standard

Home Page:https://ned14.github.io/llfio/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

jcelerier opened this issue · 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);

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?

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 ?

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.

which mingw do you refer to?

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

Cool, rock on with that at your convenience.

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