Create statically-linked binary that uses getaddrinfo?

前端 未结 3 1782
忘掉有多难
忘掉有多难 2020-11-30 00:50

I have included the header netdb.h, where getaddrinfo is included, but gcc issues this warning:

warning: Using \'getaddrinfo\' in s         


        
3条回答
  •  孤街浪徒
    2020-11-30 01:25

    glibc uses libnss to support a number of different providers for address resolution services. Unfortunately, you cannot statically link libnss, as exactly what providers it loads depends on the local system's configuration.

提交回复
热议问题