diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 17:47:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 17:47:29 +0000 |
commit | 4f5791ebd03eaec1c7da0865a383175b05102712 (patch) | |
tree | 8ce7b00f7a76baa386372422adebbe64510812d4 /third_party/heimdal/cf/broken-getaddrinfo.m4 | |
parent | Initial commit. (diff) | |
download | samba-4f5791ebd03eaec1c7da0865a383175b05102712.tar.xz samba-4f5791ebd03eaec1c7da0865a383175b05102712.zip |
Adding upstream version 2:4.17.12+dfsg.upstream/2%4.17.12+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/heimdal/cf/broken-getaddrinfo.m4')
-rw-r--r-- | third_party/heimdal/cf/broken-getaddrinfo.m4 | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/third_party/heimdal/cf/broken-getaddrinfo.m4 b/third_party/heimdal/cf/broken-getaddrinfo.m4 new file mode 100644 index 0000000..5daf416 --- /dev/null +++ b/third_party/heimdal/cf/broken-getaddrinfo.m4 @@ -0,0 +1,26 @@ +dnl $Id$ +dnl +dnl test if getaddrinfo can handle numeric services + +AC_DEFUN([rk_BROKEN_GETADDRINFO],[ +AC_CACHE_CHECK([if getaddrinfo handles numeric services], ac_cv_func_getaddrinfo_numserv, +AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> +#include <sys/types.h> +#include <sys/socket.h> +#include <netdb.h> + +int +main(int argc, char **argv) +{ + struct addrinfo hints, *ai; + memset(&hints, 0, sizeof(hints)); + hints.ai_flags = AI_PASSIVE; + hints.ai_socktype = SOCK_STREAM; + hints.ai_family = PF_UNSPEC; + if(getaddrinfo(NULL, "17", &hints, &ai) != 0) + return 1; + if(getaddrinfo(NULL, "0", &hints, &ai) != 0) + return 1; + return 0; +} +]])],[ac_cv_func_getaddrinfo_numserv=yes],[ac_cv_func_getaddrinfo_numserv=no],[ac_cv_func_getaddrinfo_numserv=yes]))]) |