diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/xauth/gethost.c | 5 | ||||
-rw-r--r-- | apps/xauth/process.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/apps/xauth/gethost.c b/apps/xauth/gethost.c index acac86478..cac6e9ec1 100644 --- a/apps/xauth/gethost.c +++ b/apps/xauth/gethost.c @@ -72,6 +72,11 @@ in this Software without prior written authorization from The Open Group. #ifndef WIN32 #include <arpa/inet.h> +#else +#if NTDDI_VERSION < NTDDI_VISTA +int inet_pton(int af, const char *src, void *dst); +const char *inet_ntop(int af, const void *src, char *dst, socklen_t cnt); +#endif #endif #ifdef SIGALRM diff --git a/apps/xauth/process.c b/apps/xauth/process.c index a4021c7e6..f4f543cf8 100644 --- a/apps/xauth/process.c +++ b/apps/xauth/process.c @@ -810,7 +810,7 @@ write_auth_file(char *tmp_nam) (void) unlink (tmp_nam); /* CPhipps 2000/02/12 - fix file unlink/fopen race */ fd = open(tmp_nam, O_WRONLY | O_CREAT | O_EXCL, 0600); - if (fd != -1) fp = fdopen (fd, "wb"); + if (fd != -1) fp = _fdopen (fd, "wb"); if (!fp) { if (fd != -1) close(fd); fprintf (stderr, "%s: unable to open tmp file \"%s\"\n", |