--- sanei/sanei_init_debug.c.orig 2020-12-04 22:33:53 UTC +++ sanei/sanei_init_debug.c @@ -100,7 +100,10 @@ sanei_debug_msg if (max_level >= level) { - if ( 1 == isfdtype(fileno(stderr), S_IFSOCK) ) + struct stat ss; + fstat(fileno(stderr), &ss); + + if (ss.st_mode & S_IFSOCK) { msg = (char *)malloc (sizeof(char) * (strlen(be) + strlen(fmt) + 4)); if (msg == NULL)