aboutsummaryrefslogtreecommitdiffstats
path: root/jnlib/logging.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2004-11-23 17:09:51 +0000
committerWerner Koch <[email protected]>2004-11-23 17:09:51 +0000
commitc7b97075aa213a7ac54b8c56679719679816b3fa (patch)
tree04945dddc36984039b8b403f7eabbb7852cfe53c /jnlib/logging.c
parentPost release preparations (diff)
downloadgnupg-c7b97075aa213a7ac54b8c56679719679816b3fa.tar.gz
gnupg-c7b97075aa213a7ac54b8c56679719679816b3fa.zip
* b64enc.c: Include stdio.h and string.h
* gpgsm.c: New option --prefer-system-dirmngr. * call-dirmngr.c (start_dirmngr): Implement this option. * gpgconf-comp.c <dirmngr>: Add the proxy options. <gpgsm>: Add --prefer-system-daemon.
Diffstat (limited to 'jnlib/logging.c')
-rw-r--r--jnlib/logging.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/jnlib/logging.c b/jnlib/logging.c
index 7a5e1552e..5397a1184 100644
--- a/jnlib/logging.c
+++ b/jnlib/logging.c
@@ -35,6 +35,7 @@
#include <time.h>
#include <sys/types.h>
#include <sys/socket.h>
+#include <sys/stat.h>
#include <sys/un.h>
#include <unistd.h>
#include <fcntl.h>
@@ -411,9 +412,12 @@ log_get_prefix (unsigned int *flags)
int
log_test_fd (int fd)
{
- int tmp = fileno (logstream);
- if ( tmp != -1 && tmp == fd)
- return 1;
+ if (logstream)
+ {
+ int tmp = fileno (logstream);
+ if ( tmp != -1 && tmp == fd)
+ return 1;
+ }
if (log_socket != -1 && log_socket == fd)
return 1;
return 0;