Giter Site home page Giter Site logo

Comments (9)

James-TR avatar James-TR commented on July 17, 2024

I'm going to have a look at how to fix this code along with some people from the musl project, are there any suggestions as to how you would want this handled?

from mtr.

ncopa avatar ncopa commented on July 17, 2024

I'd suggest using the library c-ares for DNS resolution. Possibly making it compile time optional with --disable-dns.

from mtr.

rewolff avatar rewolff commented on July 17, 2024

Could you test the branch "newdns"?

Today three or four reports of "things going wrong" with the self-written internal DNS resolver. I'm getting a bit tired of that....

from mtr.

James-TR avatar James-TR commented on July 17, 2024

@rewolff thanks, I'll happily have a look. Been busy getting patches for a lot of the stuff I'm using upstreamed :)

from mtr.

James-TR avatar James-TR commented on July 17, 2024
checking whether __res_state_ext needs to be defined... yes
checking whether provided __res_state_ext definition can be compiled... no
configure: error: Need definition for struct __res_state_ext but unable to define it.

^ this is as far as I got with the newdns branch, same error as before due to musl not having a resolver like that of glibc

from mtr.

ncopa avatar ncopa commented on July 17, 2024

I get this error:

checking whether provided __res_state_ext definition can be compiled... no
configure: error: Need definition for struct __res_state_ext but unable to define it.

As I understand __anything is for internal libc use only and should not be used (or even exposed) to applications.

That said, it compiles with --disable-ipv6

from mtr.

ncopa avatar ncopa commented on July 17, 2024

the __res_state_ext is apparently not needed for the 'newdns' branch. After removing it it builds and appears to work just fine.

diff --git a/configure.ac b/configure.ac
index d50c253..708db4f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -139,57 +139,6 @@ AC_CHECK_FUNC(getaddrinfo,
        USES_IPV6=yes
 fi])

-AC_DEFUN([NEED_RES_STATE_EXT_TEST_SRC], [
-AC_LANG_PROGRAM([[
-#include <netinet/in.h>
-#include <resolv.h>
-#ifdef __GLIBC__
-#define RESEXTIN6(r,i) (*(r._u._ext.nsaddrs[i]))
-#else
-#define RESEXTIN6(r,i) (r._u._ext.ext->nsaddrs[i].sin6)
-#endif
-]], [[
-struct __res_state res;
-return RESEXTIN6(res,0).sin6_addr.s6_addr[0];
-]])])
-AC_DEFUN([DEFINE_RES_STATE_EXT_TEST_SRC], [
-AC_LANG_PROGRAM([[
-#include <netinet/in.h>
-#include <resolv.h>
-#ifdef __GLIBC__
-#define RESEXTIN6(r,i) (*(r._u._ext.nsaddrs[i]))
-#else
-#define RESEXTIN6(r,i) (r._u._ext.ext->nsaddrs[i].sin6)
-struct __res_state_ext {
-       union res_sockaddr_union nsaddrs[MAXNS];
-       struct sort_list {
-               int     af;
-               union {
-                       struct in_addr  ina;
-                       struct in6_addr in6a;
-               } addr, mask;
-       } sort_list[MAXRESOLVSORT];
-       char nsuffix[64];
-       char nsuffix2[64];
-};
-#endif
-]], [[
-struct __res_state res;
-return RESEXTIN6(res,0).sin6_addr.s6_addr[0];
-]])])
-if test "x$USES_IPV6" = "xyes"; then
-       AC_MSG_CHECKING([whether __res_state_ext needs to be defined])
-       AC_COMPILE_IFELSE([NEED_RES_STATE_EXT_TEST_SRC],
-               [AC_MSG_RESULT([no])],
-               [AC_MSG_RESULT([yes])
-               AC_MSG_CHECKING([whether provided __res_state_ext definition can be compiled])
-               AC_COMPILE_IFELSE([DEFINE_RES_STATE_EXT_TEST_SRC],
-                       [AC_MSG_RESULT([yes])
-                       AC_DEFINE(NEED_RES_STATE_EXT, 1, [Define if struct __res_state_ext needs to be defined.])],
-                       [AC_MSG_RESULT([no])
-                       AC_MSG_ERROR(Need definition for struct __res_state_ext but unable to define it.)])])
-fi
-
 AC_CHECK_DECLS(errno, , , [[
 #include <errno.h>
 #include <sys/errno.h>

from mtr.

aquerubin avatar aquerubin commented on July 17, 2024

On Fri, 19 Dec 2014, James Taylor wrote:

checking whether __res_state_ext needs to be defined... yes
checking whether provided __res_state_ext definition can be compiled... no
configure: error: Need definition for struct __res_state_ext but unable to define it.
^ this is as far as I got with the newdns branch, same error as before due to musl not having a resolver like that of glibc

I don't think those checks are needed for the newdns branch any more.

Antonio Querubin
e-mail: [email protected]
xmpp: [email protected]

from mtr.

rewolff avatar rewolff commented on July 17, 2024

yeah. removed and uploaded.

from mtr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.