]> ruderich.org/simon Gitweb - coloredstderr/coloredstderr.git/blobdiff - src/coloredstderr.c
configure.ac: Check if __overflow() is available.
[coloredstderr/coloredstderr.git] / src / coloredstderr.c
index 7db0a37abe33bb4291f0a0f1e579163c8bb1034d..22c37675eaaf0fa660480ccb329549ce1e913c3b 100644 (file)
@@ -275,9 +275,9 @@ HOOK_FILE1(int, putchar_unlocked, stdout,
  * part. As writes to stderr are never buffered, __overflow() is always called
  * and everything works fine. This is only a problem if stdout is dupped to
  * stderr (which shouldn't be the case too often). */
-#ifdef HAVE_STRUCT__IO_FILE__FILENO
+#if defined(HAVE_STRUCT__IO_FILE__FILENO) && defined(HAVE___OVERFLOW)
 /* _IO_FILE is glibc's representation of FILE. */
-HOOK_FD2(int, __overflow, f->_fileno, _IO_FILE *, f, int, ch)
+HOOK_FILE2(int, __overflow, f, _IO_FILE *, f, int, ch)
 #endif
 
 /* perror(3) */