URL: <https://savannah.gnu.org/support/?111402>
Summary: Error in IPv6 testing code snippet (missing
string.h)
Group: Autoconf
Submitter: joergent
Submitted: Sun 12 Apr 2026 11:33:01 AM UTC
Priority: 5 - Unprioritized
Severity: 4 - Important
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Unlocked
Operating System: GNU/Linux
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Sun 12 Apr 2026 11:33:01 AM UTC By: Anonymous
autoconf-2.72-7.fc43.src.rpm
Missing #include <string.h>
IPv6 suppport is not detected probably because of a compilation error in the
testing code due to a missing line
#include <string.h>
Code snippet in configure.ac and configure:
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <unistd.h>
int main(int argc, char **argv)
{
struct addrinfo *res, hints;
int sd;
if((sd = socket(AF_INET6, SOCK_STREAM, 0)) < 0)
return 1;
close(sd);
/* also check if getaddrinfo() handles AF_UNSPEC -- bb#1196 */
memset(&hints, 0, sizeof(hints));
hints.ai_family = AF_UNSPEC;
if(getaddrinfo("127.0.0.1", NULL, &hints, &res) < 0)
return 1;
freeaddrinfo(res);
return 0;
}
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/support/?111402>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
