Created
October 9, 2012 07:59
-
-
Save jedisct1/3857262 to your computer and use it in GitHub Desktop.
ldns headers should define socklen_t if required
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: configure.ac | |
=================================================================== | |
--- configure.ac (revision 3751) | |
+++ configure.ac (working copy) | |
@@ -449,6 +449,11 @@ | |
fi | |
ACX_TYPE_SOCKLEN_T | |
+if test "x$ac_cv_type_socklen_t" = xyes; then | |
+ AC_SUBST(ldns_build_config_have_socklen_t, 1) | |
+else | |
+ AC_SUBST(ldns_build_config_have_socklen_t, 0) | |
+fi | |
AC_TYPE_SIZE_T | |
AC_TYPE_SSIZE_T | |
AC_TYPE_INTPTR_T | |
Index: ldns/common.h.in | |
=================================================================== | |
--- ldns/common.h.in (revision 3751) | |
+++ ldns/common.h.in (working copy) | |
@@ -23,6 +23,7 @@ | |
#define LDNS_BUILD_CONFIG_HAVE_INTTYPES_H @ldns_build_config_have_inttypes_h@ | |
#define LDNS_BUILD_CONFIG_HAVE_ATTR_FORMAT @ldns_build_config_have_attr_format@ | |
#define LDNS_BUILD_CONFIG_HAVE_ATTR_UNUSED @ldns_build_config_have_attr_unused@ | |
+#define LDNS_BUILD_CONFIG_HAVE_SOCKLEN_T @ldns_build_config_have_socklen_t@ | |
/* | |
* HAVE_STDBOOL_H is not available when distributed as a library, but no build | |
@@ -65,4 +66,8 @@ | |
#define ATTR_UNUSED(x) x | |
#endif /* !LDNS_BUILD_CONFIG_HAVE_ATTR_UNUSED */ | |
+#if !LDNS_BUILD_CONFIG_HAVE_SOCKLEN_T | |
+typedef int socklen_t; | |
+#endif | |
+ | |
#endif /* LDNS_COMMON_H */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment