sbase

suckless unix tools
git clone git://git.2f30.org/sbase
Log | Files | Refs | README | LICENSE

commit bd3cf55b5416a717563e85b0babe202183c98e91
parent ba70777b563b2dd770f57814c5ff3099694cec65
Author: sin <sin@2f30.org>
Date:   Mon, 17 Nov 2014 14:50:12 +0000

Define HOST_NAME_MAX if necessary

Some systems do not provide this, namely FreeBSD and NetBSD.

Diffstat:
Mutil.h | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/util.h b/util.h @@ -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