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

build failure with gcc 4.3.5 #482

Closed
cspiel1 opened this issue Aug 22, 2022 · 1 comment
Closed

build failure with gcc 4.3.5 #482

cspiel1 opened this issue Aug 22, 2022 · 1 comment

Comments

@cspiel1
Copy link
Collaborator

cspiel1 commented Aug 22, 2022

  CC      build-blackfin/dns/client.o
src/dns/client.c: In function 'async_getaddrinfo':
src/dns/client.c:785: error: storage size of 'hints' isn't known
src/dns/client.c:794: error: 'AI_ADDRCONFIG' undeclared (first use in this function)

With reverted 6729125 re builds again.

@cspiel1
Copy link
Collaborator Author

cspiel1 commented Aug 22, 2022

When looking in src/sa/sa.c, which compiles we have:

#ifndef WIN32
#include <arpa/inet.h>
#define __USE_POSIX 1  /**< Use POSIX flag */
#define __USE_XOPEN2K 1/**< Use POSIX.1:2001 code */
#define __USE_MISC 1
#include <netdb.h>
#endif

Using same snippet for client.c and also net.c then re compiles successfully.

rt.c doesn't define __USE_XOPEN2K. Do we need this for the other netdb.h includes?

I tried also without __USE_XOPEN2K and without __USE_MISC in net.c and dns/client.c with gcc 4.3.5. It compiles. I will open a PR for discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants