From a6e38696e866f017f293899d2622a63147909df3 Mon Sep 17 00:00:00 2001 From: florian Date: Tue, 14 Apr 2009 14:54:34 +0000 Subject: [tools] more cygwin related build fixes git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15227 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- tools/include/getline.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tools/include/getline.h') diff --git a/tools/include/getline.h b/tools/include/getline.h index 219be7520..b9a3f7150 100644 --- a/tools/include/getline.h +++ b/tools/include/getline.h @@ -40,10 +40,16 @@ static inline ssize_t getline(char **outbuf, size_t *outsize, FILE *fp) { - char *buf; size_t len; +#ifndef __CYGWIN__ + char *buf; buf = fgetln(fp, &len); +#else + char buf[512]; + fgets(buf, sizeof(buf), fp); + len = strlen(buf); +#endif if (buf == NULL) return (-1); -- cgit v1.2.3