Hi, I can run following code in Ubuntu to print out the host address, but I could not get host address (empty) in Yoctor imx6 build. That function is POSIX compatible, what I could be missing?
struct sockaddr *addr; /* input */ socklen_t addrlen; /* input */ char hbuf[NI_MAXHOST]; if (getnameinfo(addr, addrlen, hbuf, sizeof(hbuf), NULL, 0, NI_NAMEREQD)) printf("could not resolve hostname"); else printf("host=%s\n", hbuf); Thank you. Kind regards, - jupiter -- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto