From 7e6245aa708526949100478f5847704a7dd6eac2 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Sun, 4 Oct 2015 23:29:17 +0200 Subject: portability: dont use HOST_NAME_MAX, just use 256 as maximum --- sfeed_html.c | 2 -- sfeed_mbox.c | 3 +-- sfeed_plain.c | 1 - sfeed_web.c | 1 - util.h | 2 +- 5 files changed, 2 insertions(+), 7 deletions(-) diff --git a/sfeed_html.c b/sfeed_html.c index 04addcc..e5f27b5 100644 --- a/sfeed_html.c +++ b/sfeed_html.c @@ -1,6 +1,4 @@ -#include #include -#include #include #include #include diff --git a/sfeed_mbox.c b/sfeed_mbox.c index a093c46..0ee5bfd 100644 --- a/sfeed_mbox.c +++ b/sfeed_mbox.c @@ -2,7 +2,6 @@ #include #include -#include #include #include #include @@ -79,7 +78,7 @@ printfeed(FILE *fp, const char *feedname) { struct tm tm; char *fields[FieldLast], timebuf[32], mtimebuf[32]; - char host[HOST_NAME_MAX + 1], *user; + char host[256], *user; time_t parsedtime; if (!(user = getenv("USER"))) diff --git a/sfeed_plain.c b/sfeed_plain.c index 92e1aa6..82bfcdd 100644 --- a/sfeed_plain.c +++ b/sfeed_plain.c @@ -1,6 +1,5 @@ #include #include -#include #include #include #include diff --git a/sfeed_web.c b/sfeed_web.c index 95d60f0..89f0336 100644 --- a/sfeed_web.c +++ b/sfeed_web.c @@ -1,5 +1,4 @@ #include -#include #include #include #include diff --git a/util.h b/util.h index ffd4a3a..2e55460 100644 --- a/util.h +++ b/util.h @@ -15,7 +15,7 @@ struct feed { /* uri */ struct uri { char proto[48]; - char host[HOST_NAME_MAX + 1]; + char host[256]; char path[2048]; char port[6]; /* numeric port */ }; -- cgit v1.2.3