]> Pileus Git - ~andy/fetchmail/commitdiff
This version works.
authorEric S. Raymond <esr@thyrsus.com>
Mon, 30 Dec 1996 22:41:39 +0000 (22:41 -0000)
committerEric S. Raymond <esr@thyrsus.com>
Mon, 30 Dec 1996 22:41:39 +0000 (22:41 -0000)
svn path=/trunk/; revision=713

socket.c

index c552e31dd6847a5320abd035e199bfeeb160e9ee..af5018e47f15eaec4c24fc0f0bc764ea6096c668 100644 (file)
--- a/socket.c
+++ b/socket.c
@@ -172,7 +172,17 @@ int SockWrite(char *buf, int size, int len, FILE *sockfp)
 
 char *SockGets(char *buf, int len, FILE *sockfp)
 {
-    return(fgets(buf, len, sockfp));
+    char *in = fgets(buf, len, sockfp);
+
+#ifndef linux
+    /*
+     * Weirdly, this actually wedges under Linux (2.0.27 with libc 5.3.12-8).
+     * It's apparently good under NEXTSTEP.
+     */
+    fseek(sockfp, 0L, SEEK_CUR);       /* required by POSIX */
+#endif /* linux */
+
+    return(in);
 }
 
 #endif