+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h> /* for htonl on FreeBSD */
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h> /* for htonl on Linux/Solaris */
+#endif
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h> /* for htonl on Solaris */
+#endif
+#ifdef HAVE_STDINT_H
+#include <stdint.h> /* Standard ints on Linux */
+#endif