diff options
author | Werner Koch <[email protected]> | 2009-06-04 14:19:21 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2009-06-04 14:19:21 +0000 |
commit | e80d9387b2f81e7b3edab9d2647e2ba303e1254a (patch) | |
tree | e921e87ae8981b8ad3dbe884dac75895caa768f0 /jnlib/mischelp.h | |
parent | Fixed an fopen problem on Windows Vista. (diff) | |
download | gnupg-e80d9387b2f81e7b3edab9d2647e2ba303e1254a.tar.gz gnupg-e80d9387b2f81e7b3edab9d2647e2ba303e1254a.zip |
Define SUN_LEN also for W32.
Diffstat (limited to 'jnlib/mischelp.h')
-rw-r--r-- | jnlib/mischelp.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/jnlib/mischelp.h b/jnlib/mischelp.h index 6bf7a9174..e478354d1 100644 --- a/jnlib/mischelp.h +++ b/jnlib/mischelp.h @@ -61,9 +61,13 @@ time_t timegm (struct tm *tm); /* Include hacks which are mainly required for Slowaris. */ -#if defined(JNLIB_NEED_AFLOCAL) && !defined(HAVE_W32_SYSTEM) -#include <sys/socket.h> -#include <sys/un.h> +#ifdef JNLIB_NEED_AFLOCAL +#ifndef HAVE_W32_SYSTEM +# include <sys/socket.h> +# include <sys/un.h> +#else +# include <windows.h> +#endif #ifndef PF_LOCAL # ifdef PF_UNIX @@ -88,7 +92,7 @@ time_t timegm (struct tm *tm); # define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path) \ + strlen ((ptr)->sun_path)) #endif /*SUN_LEN*/ -#endif /*JNLIB_NEED_AFLOCAL && !HAVE_W32_SYSTEM*/ +#endif /*JNLIB_NEED_AFLOCAL*/ #endif /*LIBJNLIB_MISCHELP_H*/ |