summaryrefslogtreecommitdiff
path: root/security/trousers/files/patch-src-tcs-ps-ps_utils.c
blob: cc2dfab9a58b86580936a58ee5f6024e1fe4a7e8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
--- src/tcs/ps/ps_utils.c.orig	2014-04-24 18:05:44 UTC
+++ src/tcs/ps/ps_utils.c
@@ -16,10 +16,18 @@
 #if defined(HAVE_BYTEORDER_H)
 #include <sys/byteorder.h>
 #elif defined(HTOLE_DEFINED)
+#if defined(HAVE_ENDIAN_H)
 #include <endian.h>
 #define LE_16 htole16
 #define LE_32 htole32
 #define LE_64 htole64
+#endif
+#if defined(HAVE_SYS_ENDIAN_H)
+#include <sys/endian.h>
+#define LE_16 htole16
+#define LE_32 htole32
+#define LE_64 htole64
+#endif
 #else
 #define LE_16(x) (x)
 #define LE_32(x) (x)
@@ -42,11 +50,7 @@
 struct key_disk_cache *key_disk_cache_head = NULL;
 
 
-#ifdef SOLARIS
 TSS_RESULT
-#else
-inline TSS_RESULT
-#endif
 read_data(int fd, void *data, UINT32 size)
 {
 	int rc;
@@ -64,11 +68,7 @@ read_data(int fd, void *data, UINT32 siz
 }
 
 
-#ifdef SOLARIS
 TSS_RESULT
-#else
-inline TSS_RESULT
-#endif
 write_data(int fd, void *data, UINT32 size)
 {
 	int rc;