N
Nathan
Hi,
I'm trying to do some network programming, but when I use 'struct
addrinfo' or getaddrinfo, I see errors:
[ ~/src/_sandbox] gcc --std=c99 -Wall ipv6_test.c -o it
ipv6_test.c: In function `main':
ipv6_test.c:25: error: storage size of 'hints' isn't known
ipv6_test.c:34: warning: implicit declaration of function
`getaddrinfo'
ipv6_test.c:38: error: dereferencing pointer to incomplete type
ipv6_test.c:39: error: dereferencing pointer to incomplete type
ipv6_test.c:40: error: dereferencing pointer to incomplete type
ipv6_test.c:41: error: dereferencing pointer to incomplete type
ipv6_test.c:49: error: dereferencing pointer to incomplete type
ipv6_test.c:49: error: dereferencing pointer to incomplete type
ipv6_test.c:49: error: dereferencing pointer to incomplete type
ipv6_test.c:56: warning: implicit declaration of function
`gai_strerror'
ipv6_test.c:56: warning: format argument is not a pointer (arg 4)
ipv6_test.c:71: error: dereferencing pointer to incomplete type
ipv6_test.c:71: error: dereferencing pointer to incomplete type
ipv6_test.c:77: warning: implicit declaration of function
`freeaddrinfo'
ipv6_test.c:25: warning: unused variable `hints'
However, it builds fine when I remove --std-c99
Does anyone know the reason for this?
Thanks,
Nathan
I'm trying to do some network programming, but when I use 'struct
addrinfo' or getaddrinfo, I see errors:
[ ~/src/_sandbox] gcc --std=c99 -Wall ipv6_test.c -o it
ipv6_test.c: In function `main':
ipv6_test.c:25: error: storage size of 'hints' isn't known
ipv6_test.c:34: warning: implicit declaration of function
`getaddrinfo'
ipv6_test.c:38: error: dereferencing pointer to incomplete type
ipv6_test.c:39: error: dereferencing pointer to incomplete type
ipv6_test.c:40: error: dereferencing pointer to incomplete type
ipv6_test.c:41: error: dereferencing pointer to incomplete type
ipv6_test.c:49: error: dereferencing pointer to incomplete type
ipv6_test.c:49: error: dereferencing pointer to incomplete type
ipv6_test.c:49: error: dereferencing pointer to incomplete type
ipv6_test.c:56: warning: implicit declaration of function
`gai_strerror'
ipv6_test.c:56: warning: format argument is not a pointer (arg 4)
ipv6_test.c:71: error: dereferencing pointer to incomplete type
ipv6_test.c:71: error: dereferencing pointer to incomplete type
ipv6_test.c:77: warning: implicit declaration of function
`freeaddrinfo'
ipv6_test.c:25: warning: unused variable `hints'
However, it builds fine when I remove --std-c99
Does anyone know the reason for this?
Thanks,
Nathan