sanei: replace non-portable isfdtype() with fstat()

master^2
Michael Klein 2023-01-12 20:46:36 +01:00
rodzic 013a47c03b
commit c33752c719
1 zmienionych plików z 20 dodań i 19 usunięć

Wyświetl plik

@ -100,7 +100,8 @@ sanei_debug_msg
if (max_level >= level)
{
if ( 1 == isfdtype(fileno(stderr), S_IFSOCK) )
struct stat sb;
if ( 0 == fstat(fileno(stderr), &sb) && S_IFSOCK == (sb.st_mode & S_IFMT) )
{
msg = (char *)malloc (sizeof(char) * (strlen(be) + strlen(fmt) + 4));
if (msg == NULL)