Module Name:    src
Committed By:   christos
Date:           Sat Jan 28 02:09:08 UTC 2012

Modified Files:
        src/crypto/external/cpl/trousers/dist/src/tspi/ps: tspps.c

Log Message:
- add && defined(__NetBSS__) where appropriate.
- we don't have <endian.h>, perhaps we should?


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.1 -r1.2 \
    src/crypto/external/cpl/trousers/dist/src/tspi/ps/tspps.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/cpl/trousers/dist/src/tspi/ps/tspps.c
diff -u src/crypto/external/cpl/trousers/dist/src/tspi/ps/tspps.c:1.1.1.1 src/crypto/external/cpl/trousers/dist/src/tspi/ps/tspps.c:1.2
--- src/crypto/external/cpl/trousers/dist/src/tspi/ps/tspps.c:1.1.1.1	Fri Jan 27 20:36:42 2012
+++ src/crypto/external/cpl/trousers/dist/src/tspi/ps/tspps.c	Fri Jan 27 21:09:08 2012
@@ -25,7 +25,11 @@
 #if defined (HAVE_BYTEORDER_H)
 #include <sys/byteorder.h>
 #elif defined(HTOLE_DEFINED)
+#ifdef __NetBSD__
+#include <sys/endian.h>
+#else
 #include <endian.h>
+#endif
 #define LE_16 htole16
 #define LE_32 htole32
 #define LE_64 htole64
@@ -45,7 +49,7 @@
 
 static int user_ps_fd = -1;
 static MUTEX_DECLARE_INIT(user_ps_lock);
-#if (defined (__FreeBSD__) || defined (__OpenBSD__))
+#if (defined (__FreeBSD__) || defined (__OpenBSD__) || defined(__NetBSD__))
 static MUTEX_DECLARE_INIT(user_ps_path);
 #endif
 static struct flock fl;
@@ -72,7 +76,7 @@ get_user_ps_path(char **file)
 		*file = strdup(file_name);
 		return (*file) ? TSS_SUCCESS : TSPERR(TSS_E_OUTOFMEMORY);
 	}
-#if (defined (__FreeBSD__) || defined (__OpenBSD__))
+#if (defined (__FreeBSD__) || defined (__OpenBSD__) || defined(__NetBSD__))
 	MUTEX_LOCK(user_ps_path);
 #endif
 
@@ -99,7 +103,7 @@ get_user_ps_path(char **file)
 			return TSPERR(TSS_E_INTERNAL_ERROR);
 		}
 
-#elif (defined (__FreeBSD__) || defined (__OpenBSD__))
+#elif (defined (__FreeBSD__) || defined (__OpenBSD__) || defined(__NetBSD__))
 		if ((pwp = getpwent()) == NULL) {
 			LogDebugFn("USER PS: Error getting path to home directory: getpwent: %s",
                                    strerror(rc));

Reply via email to