diff --git a/acinclude.m4 b/acinclude.m4
index 1dd8ad1..2730606 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -349,6 +349,9 @@ dnl
AC_TRY_COMPILE([
$1
+#ifdef HAVE_STDDEF_H
+#include <stddef.h>
+#endif
#ifndef offsetof
#define offsetof(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER)
#endif
diff --git a/configure b/configure
index cd0356c..73e8732 100755
--- a/configure
+++ b/configure
@@ -20091,9 +20091,7 @@ echo "${ECHO_T}no" >&6; }
fi
-else
- LIBTOOL="`pwd`/libtool"
@@ -20103,6 +20101,10 @@ else
+else
+
+ LIBTOOL="`pwd`/libtool"
+
@@ -22726,6 +22728,8 @@ fi
+
+
for ac_header in \
unistd.h \
crypt.h \
@@ -22760,6 +22764,7 @@ for ac_header in \
prot.h \
pwd.h \
grp.h \
+ stddef.h \
sia.h \
siad.h
@@ -23163,6 +23168,7 @@ echo "$as_me: skipping test for openssl/ssl.h" >&6;}
+
for ac_header in \
openssl/ssl.h \
openssl/crypto.h \
@@ -24775,6 +24781,9 @@ cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <utmpx.h>
+#ifdef HAVE_STDDEF_H
+#include <stddef.h>
+#endif
#ifndef offsetof
#define offsetof(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER)
#endif
@@ -24848,6 +24857,9 @@ cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <netinet/in.h>
+#ifdef HAVE_STDDEF_H
+#include <stddef.h>
+#endif
#ifndef offsetof
#define offsetof(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER)
#endif
@@ -24920,6 +24932,9 @@ cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <netinet/in.h>
+#ifdef HAVE_STDDEF_H
+#include <stddef.h>
+#endif
#ifndef offsetof
#define offsetof(TYPE, MEMBER) ((int) &((TYPE *)0)->MEMBER)
#endif
diff --git a/configure.in b/configure.in
index 24476fb..a12eb9f 100644
--- a/configure.in
+++ b/configure.in
@@ -619,6 +619,7 @@ AC_CHECK_HEADERS( \
prot.h \
pwd.h \
grp.h \
+ stddef.h \
sia.h \
siad.h
)
diff --git a/src/include/autoconf.h.in b/src/include/autoconf.h.in
index 9b5d1b8..3493254 100644
--- a/src/include/autoconf.h.in
+++ b/src/include/autoconf.h.in
@@ -257,6 +257,9 @@
/* Define to 1 if you have the `snprintf' function. */
#undef HAVE_SNPRINTF
+/* Define to 1 if you have the <stddef.h> header file. */
+#undef HAVE_STDDEF_H
+
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
diff --git a/src/include/missing.h b/src/include/missing.h
index 7c7b37f..679d7f2 100644
--- a/src/include/missing.h
+++ b/src/include/missing.h
@@ -18,6 +18,10 @@ RCSIDH(missing_h, "$Id$")
#include <stdint.h>
#endif
+#ifdef HAVE_STDDEF_H
+#include <stddef.h>
+#endif
+
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif