Do not hardcode the file descriptor when calling isatty(), use the one provided as an argument. Regression introduced in commit 50c1cb4d6e8b4c3ee739646f9df05992b806ea5e.
@@ -34,7 +34,7 @@
void
dpkg_set_report_buffer(FILE *fp)
{
- if (isatty(STDOUT_FILENO))
+ if (isatty(fileno(fp)))
setvbuf(fp, NULL, _IONBF, 0);
else
setvbuf(fp, NULL, _IOFBF, 0);