summaryrefslogtreecommitdiff
path: root/sanei/sanei_init_debug.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2020-08-24 18:44:51 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2020-08-24 18:44:51 +0200
commitad38bc6ecb80ddeb562841b33258dd53659b1da6 (patch)
treee02e9c3ff760554fd87f70df0e18b88594091a48 /sanei/sanei_init_debug.c
parent9c23ed018d72eed2554f4f9cff1ae6e6bb0cd479 (diff)
New upstream version 1.0.31upstream/1.0.31
Diffstat (limited to 'sanei/sanei_init_debug.c')
-rw-r--r--sanei/sanei_init_debug.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sanei/sanei_init_debug.c b/sanei/sanei_init_debug.c
index 3cde74e..d5d64f2 100644
--- a/sanei/sanei_init_debug.c
+++ b/sanei/sanei_init_debug.c
@@ -118,7 +118,7 @@ is_socket (int fd)
#if defined(S_ISSOCK)
return S_ISSOCK(sbuf.st_mode);
-#elif defined (S_IFMT) && defined(S_IFMT)
+#elif defined (S_IFMT) && defined(S_IFSOCK)
return (sbuf.st_mode & S_IFMT) == S_IFSOCK;
#else
return 0;
@@ -133,6 +133,7 @@ sanei_debug_msg
if (max_level >= level)
{
+#if defined(LOG_DEBUG)
if (is_socket(fileno(stderr)))
{
msg = (char *)malloc (sizeof(char) * (strlen(be) + strlen(fmt) + 4));
@@ -149,6 +150,7 @@ sanei_debug_msg
}
}
else
+#endif
{
struct timeval tv;
struct tm *t;