diff options
author | florian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2009-04-14 14:54:34 +0000 |
---|---|---|
committer | florian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2009-04-14 14:54:34 +0000 |
commit | a6e38696e866f017f293899d2622a63147909df3 (patch) | |
tree | ee37be750da98c6c1674de6125b90a74ce0b9c89 /tools/include/getline.h | |
parent | b2b8e3bed89afe2008ad741bc05b313715c56b64 (diff) |
[tools] more cygwin related build fixes
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@15227 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'tools/include/getline.h')
-rw-r--r-- | tools/include/getline.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/include/getline.h b/tools/include/getline.h index 219be75204..b9a3f7150f 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); |