aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--agent/gpg-agent.c6
-rw-r--r--dirmngr/dirmngr.c13
-rw-r--r--scd/scdaemon.c13
3 files changed, 6 insertions, 26 deletions
diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c
index 90e8a2657..efaebfd94 100644
--- a/agent/gpg-agent.c
+++ b/agent/gpg-agent.c
@@ -39,7 +39,6 @@
# endif
# include <aclapi.h>
# include <sddl.h>
-# include <direct.h>
#else /*!HAVE_W32_SYSTEM*/
# include <sys/socket.h>
# include <sys/un.h>
@@ -1559,11 +1558,6 @@ main (int argc, char **argv )
(void)csh_style;
(void)nodetach;
initialize_modules ();
- if (_chdir("\\"))
- {
- log_error ("chdir to / failed: %s\n", strerror (errno));
- exit (1);
- }
#else /*!HAVE_W32_SYSTEM*/
diff --git a/dirmngr/dirmngr.c b/dirmngr/dirmngr.c
index b19b4180d..6eabca9c3 100644
--- a/dirmngr/dirmngr.c
+++ b/dirmngr/dirmngr.c
@@ -30,11 +30,9 @@
#include <assert.h>
#include <time.h>
#include <fcntl.h>
-#ifdef HAVE_W32_SYSTEM
-# include <direct.h>
-#else
-# include <sys/socket.h>
-# include <sys/un.h>
+#ifndef HAVE_W32_SYSTEM
+#include <sys/socket.h>
+#include <sys/un.h>
#endif
#include <sys/stat.h>
#include <unistd.h>
@@ -1270,11 +1268,6 @@ main (int argc, char **argv)
#ifdef HAVE_W32_SYSTEM
(void)csh_style;
(void)nodetach;
- if (_chdir("\\"))
- {
- log_error ("chdir to / failed: %s\n", strerror (errno));
- exit (1);
- }
pid = getpid ();
es_printf ("set %s=%s;%lu;1\n",
diff --git a/scd/scdaemon.c b/scd/scdaemon.c
index bbb043334..26e89dd8d 100644
--- a/scd/scdaemon.c
+++ b/scd/scdaemon.c
@@ -29,11 +29,9 @@
#include <assert.h>
#include <time.h>
#include <fcntl.h>
-#ifdef HAVE_W32_SYSTEM
-# include <direct.h>
-#else
-# include <sys/socket.h>
-# include <sys/un.h>
+#ifndef HAVE_W32_SYSTEM
+#include <sys/socket.h>
+#include <sys/un.h>
#endif /*HAVE_W32_SYSTEM*/
#include <unistd.h>
#include <signal.h>
@@ -813,11 +811,6 @@ main (int argc, char **argv )
#ifdef HAVE_W32_SYSTEM
(void)csh_style;
(void)nodetach;
- if (_chdir("\\"))
- {
- log_error ("chdir to / failed: %s\n", strerror (errno));
- exit (1);
- }
#else
pid = fork ();
if (pid == (pid_t)-1)