fix ssb compile error on 2.6.28
[openwrt.git] / tools / include / getline.h
index 219be75..b9a3f71 100644 (file)
 static inline ssize_t
 getline(char **outbuf, size_t *outsize, FILE *fp)
 {
 static inline ssize_t
 getline(char **outbuf, size_t *outsize, FILE *fp)
 {
-       char *buf;
        size_t len;
 
        size_t len;
 
+#ifndef __CYGWIN__
+       char *buf;
        buf = fgetln(fp, &len);
        buf = fgetln(fp, &len);
+#else
+       char buf[512];
+       fgets(buf, sizeof(buf), fp);    
+       len = strlen(buf);
+#endif
        if (buf == NULL)
                return (-1);
 
        if (buf == NULL)
                return (-1);
 
This page took 0.022655 seconds and 4 git commands to generate.