#include <time.h>
#include <dirent.h>
+#ifdef HAVE_LIMITS_H
+# include <limits.h>
+#endif
#ifdef HAVE_GETOPT_H
-#include <getopt.h>
+# include <getopt.h>
#endif
#ifdef HAVE_BSTRING_H
# include <bstring.h>
-#endif
+#endif
#ifdef HAVE_NETGROUP_H
# include <netgroup.h>
-#endif
+#endif
#if defined(HAVE_NETDB_H)
# include <netdb.h>
-#endif
+#endif
#ifdef HAVE_ENDIAN_H
# include <endian.h>
#endif