Index: /zzuf/trunk/src/lib-stream.c
===================================================================
--- /zzuf/trunk/src/lib-stream.c	(revision 2331)
+++ /zzuf/trunk/src/lib-stream.c	(revision 2332)
@@ -370,10 +370,10 @@
 
 #if defined HAVE___SREFILL /* Don't fuzz or seek if we have __srefill() */
-#   define FGETS_FUZZ \
+#   define FGETS_FUZZ(fn, fn2) \
         _zz_lock(fd); \
-        ret = ORIG(fgets)(s, size, stream); \
+        ret = ORIG(fn)(s, size, stream); \
         _zz_unlock(fd);
 #else
-#   define FGETS_FUZZ \
+#   define FGETS_FUZZ(fn, fn2) \
         if(size <= 0) \
             ret = NULL; \
@@ -387,5 +387,5 @@
                 int ch; \
                 _zz_lock(fd); \
-                ch = ORIG(fgetc)(stream); \
+                ch = ORIG(fn2)(stream); \
                 _zz_unlock(fd); \
                 if(ch == EOF) \
@@ -408,5 +408,5 @@
 #endif
 
-#define FGETS(fn) \
+#define FGETS(fn, fn2) \
     do \
     { \
@@ -414,9 +414,9 @@
         ret = s; \
         LOADSYM(fn); \
-        LOADSYM(fgetc); \
+        LOADSYM(fn2); \
         fd = fileno(stream); \
         if(!_zz_ready || !_zz_iswatched(fd) || !_zz_isactive(fd)) \
             return ORIG(fn)(s, size, stream); \
-        FGETS_FUZZ \
+        FGETS_FUZZ(fn, fn2) \
         debug("%s(%p, %i, [%i]) = %p", __func__, s, size, fd, ret); \
     } while(0)
@@ -424,5 +424,5 @@
 char *NEW(fgets)(char *s, int size, FILE *stream)
 {
-    char *ret; FGETS(fgets); return ret;
+    char *ret; FGETS(fgets, fgetc); return ret;
 }
 
@@ -430,5 +430,5 @@
 char *NEW(fgets_unlocked)(char *s, int size, FILE *stream)
 {
-    char *ret; FGETS(fgets_unlocked); return ret;
+    char *ret; FGETS(fgets_unlocked, fgetc_unlocked); return ret;
 }
 #endif
