Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jcelerier opened this issue Jun 20, 2022 · 6 comments
Labels

Comments

@jcelerier
Copy link

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);

@ned14 ned14 added the bug label Jun 23, 2022
@ned14
Copy link
Owner

ned14 commented Jun 23, 2022

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?

@jcelerier
Copy link
Author

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 ?

@ned14
Copy link
Owner

ned14 commented Jun 29, 2022

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.

@jcelerier
Copy link
Author

which mingw do you refer to?

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

@ned14
Copy link
Owner

ned14 commented Jul 6, 2022

Cool, rock on with that at your convenience.

@jcelerier
Copy link
Author

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

ned14 added a commit that referenced this issue Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants