diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2011-01-11 17:45:26 +0100 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2011-01-11 17:55:12 +0100 |
commit | 7fbb926c0bf64e385bfec5c8db86d24b2c049a26 (patch) | |
tree | 365169483193895792dad6da269e6bc8ac39127b /src/misc.c | |
parent | bb5f5281c007043231c4d95ce1309f1a6d999d33 (diff) | |
download | libssh-7fbb926c0bf64e385bfec5c8db86d24b2c049a26.tar.gz libssh-7fbb926c0bf64e385bfec5c8db86d24b2c049a26.tar.xz libssh-7fbb926c0bf64e385bfec5c8db86d24b2c049a26.zip |
Fix getpwuid_r on opensolaris
Diffstat (limited to 'src/misc.c')
-rw-r--r-- | src/misc.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -22,8 +22,14 @@ * MA 02111-1307, USA. */ -#include "config.h" +#ifndef _WIN32 +/* This is needed for a standard getpwuid_r on opensolaris */ +#define _POSIX_PTHREAD_SEMANTICS +#include <pwd.h> +#include <arpa/inet.h> +#endif +#include "config.h" #include <limits.h> #include <stdio.h> #include <string.h> @@ -47,12 +53,6 @@ # include <io.h> #endif /* _MSC_VER */ -#else /* _WIN32 */ - -/* This is needed for a standard getpwuid_r on opensolaris */ -#define _POSIX_PTHREAD_SEMANTICS -#include <pwd.h> -#include <arpa/inet.h> #endif /* _WIN32 */ #include "libssh/priv.h" |