summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorGergely Nagy <algernon@balabit.hu>2012-03-24 15:52:25 +0100
committerGergely Nagy <algernon@balabit.hu>2012-03-24 15:52:25 +0100
commitc515ced437047b459cfce6b6a34eb572558566f9 (patch)
tree8edac49a71c8c4b62bf10f20e8b33d699ff078c0 /t
parent99dd3a3f8dc881c0f4939205dc4c04bb6ea0c149 (diff)
downloadlibumberlog-c515ced437047b459cfce6b6a34eb572558566f9.tar.gz
libumberlog-c515ced437047b459cfce6b6a34eb572558566f9.tar.xz
libumberlog-c515ced437047b459cfce6b6a34eb572558566f9.zip
Portability fixes
Use _POSIX_HOST_NAME_MAX instead of HOST_NAME_MAX: both Linux and FreeBSD have the former, but FreeBSD does not have HOST_NAME_MAX in limits.h Signed-off-by: Gergely Nagy <algernon@balabit.hu>
Diffstat (limited to 't')
-rw-r--r--t/test_umberlog.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/t/test_umberlog.c b/t/test_umberlog.c
index d1c2911..f20d28b 100644
--- a/t/test_umberlog.c
+++ b/t/test_umberlog.c
@@ -61,7 +61,7 @@ test_simple (void)
{
char *msg;
struct json_object *jo;
- char host[HOST_NAME_MAX + 1];
+ char host[_POSIX_HOST_NAME_MAX + 1];
openlog ("umberlog/test_simple", 0, LOG_LOCAL0);
@@ -69,7 +69,7 @@ test_simple (void)
jo = parse_msg (msg);
free (msg);
- gethostname (host, HOST_NAME_MAX);
+ gethostname (host, _POSIX_HOST_NAME_MAX);
verify_value (jo, "msg", "hello, I'm test_simple!");
verify_value (jo, "facility", "local0");