From 9570005ba20ae2d4c068cc01b97256b01d5107eb Mon Sep 17 00:00:00 2001 From: hpa Date: Mon, 12 Nov 2001 21:44:05 +0000 Subject: [PATCH] Yet more portability hacks. --- config.h | 4 ++++ configure.in | 2 ++ tftpd/recvfrom.c | 3 +++ 3 files changed, 9 insertions(+) diff --git a/config.h b/config.h index c9abaf1..7585381 100644 --- a/config.h +++ b/config.h @@ -26,6 +26,10 @@ #define _XOPEN_SOURCE #define __EXTENSIONS__ +/* This is necessary on glibc systems */ +#define _BSD_SOURCE +#define _ISO9X_SOURCE + /* Standard includes */ #include diff --git a/configure.in b/configure.in index a83b1c9..a31bcc3 100644 --- a/configure.in +++ b/configure.in @@ -46,6 +46,8 @@ AC_CHECK_HEADERS(unistd.h) AC_CHECK_HEADERS(sys/filio.h) AC_CHECK_HEADERS(sys/stat.h) AC_CHECK_HEADERS(sys/types.h) +dnl This is needed on some versions of FreeBSD... +AC_CHECK_HEADERS(machine/param.h) AC_CHECK_TYPES(intmax_t) AC_CHECK_TYPES(long long) diff --git a/tftpd/recvfrom.c b/tftpd/recvfrom.c index 2d7452c..d094a69 100644 --- a/tftpd/recvfrom.c +++ b/tftpd/recvfrom.c @@ -21,6 +21,9 @@ #include "config.h" /* Must be included first! */ #include "recvfrom.h" #include "tftpsubs.h" +#ifdef HAVE_MACHINE_PARAM_H +#include /* Needed on some versions of FreeBSD */ +#endif #if defined(HAVE_RECVMSG) && defined(HAVE_MSGHDR_MSG_CONTROL)