])
fi
+# perfdhcp: If the clock_gettime() function does not exist on the system,
+# use an alternative supplied in the code based on gettimeofday().
CLOCK_GETTIME_LDFLAGS=
AC_CHECK_LIB([rt], [clock_gettime], [CLOCK_GETTIME_LDFLAGS=-lrt], [])
AC_SUBST([CLOCK_GETTIME_LDFLAGS])
+# perfdhcp: if getifaddrs() does not exist, have the code output a message
+# that it can't be run on this version of the operating system. For the
+# systems on which BIND 10 is built, this means Solaris 10. (Replacements
+# for this function are long and involved, and the function is reported present
+# on Solaris 11 and later, either in the libsocket or libnsl libraries.)
+AC_SEARCH_LIBS([getifaddrs], [socket nsl],
+ [AC_DEFINE([HAVE_GETIFADDRS], [1], [getifaddrs() present])])
+
# /dev/poll issue: ASIO uses /dev/poll by default if it's available (generally
# the case with Solaris). Unfortunately its /dev/poll specific code would
# trigger the gcc's "missing-field-initializers" warning, which would
tests/tools/Makefile
tests/tools/badpacket/Makefile
tests/tools/badpacket/tests/Makefile
+ tests/tools/perfdhcp/Makefile
])
AC_OUTPUT([doc/version.ent
compatcheck/sqlite3-difftbl-check.py
* PERFORMANCE OF THIS SOFTWARE.
*/
+#include <config.h>
+
+#ifndef HAVE_GETIFADDRS
+
+/*
+ * Solaris 10 does not have the getifaddrs() function available (although it
+ * is present on Solaris 11 and later). For the present we will not implement
+ * a replacement (as we do with clock_gettime) as the implementation is
+ * relatively complex. Just output a message saying that the utility is not
+ * supported on this operating system.
+ */
+
+#include <stdio.h>
+
+int
+main(const int argc, char* const argv[])
+{
+ fprintf(stderr, "perfdhcp is not supported on this version of the operating system\n");
+ return (1);
+}
+
+#else
+
+/* getifaddrs() present, so the code should compile */
+
#ifdef __linux__
#define _GNU_SOURCE
#endif
else
exit(3);
}
+
+#endif /* HAVE_GETIFADDRS */