[hackers] [sbase] Define HOST_NAME_MAX if necessary || sin
commit bd3cf55b5416a717563e85b0babe202183c98e91
Author: sin <sin_AT_2f30.org>
Date: Mon Nov 17 14:50:12 2014 +0000
Define HOST_NAME_MAX if necessary
Some systems do not provide this, namely FreeBSD and NetBSD.
diff --git a/util.h b/util.h
index 0b94152..b152ffd 100644
--- a/util.h
+++ b/util.h
_AT_@ -1,9 +1,14 @@
/* See LICENSE file for copyright and license details. */
+#include <sys/types.h>
+#include <limits.h>
#include <regex.h>
#include <stddef.h>
-#include <sys/types.h>
#include "arg.h"
+#ifndef HOST_NAME_MAX
+#define HOST_NAME_MAX _POSIX_HOST_NAME_MAX
+#endif
+
#define UTF8_POINT(c) (((c) & 0xc0) != 0x80)
#undef MIN
Received on Mon Nov 17 2014 - 15:50:45 CET
This archive was generated by hypermail 2.3.0
: Mon Nov 17 2014 - 16:00:16 CET