sfeed

Simple RSS and Atom feed parser
git clone https://git.sinitax.com/codemadness/sfeed
Log | Files | Refs | README | LICENSE | Upstream | sfeed.txt

commit 7e6245aa708526949100478f5847704a7dd6eac2
parent f9d8ddb73c6297de4702cde6382db6378786d420
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sun,  4 Oct 2015 23:29:17 +0200

portability: dont use HOST_NAME_MAX, just use 256 as maximum

Diffstat:
Msfeed_html.c | 2--
Msfeed_mbox.c | 3+--
Msfeed_plain.c | 1-
Msfeed_web.c | 1-
Mutil.h | 2+-
5 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/sfeed_html.c b/sfeed_html.c @@ -1,6 +1,4 @@ -#include <ctype.h> #include <err.h> -#include <limits.h> #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/sfeed_mbox.c b/sfeed_mbox.c @@ -2,7 +2,6 @@ #include <err.h> #include <inttypes.h> -#include <limits.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> @@ -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 @@ -1,6 +1,5 @@ #include <ctype.h> #include <err.h> -#include <limits.h> #include <stdio.h> #include <stdlib.h> #include <string.h> diff --git a/sfeed_web.c b/sfeed_web.c @@ -1,5 +1,4 @@ #include <ctype.h> -#include <limits.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> diff --git 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 */ };