summaryrefslogtreecommitdiff
path: root/security/opencryptoki/files/patch-usr-lib-pkcs11-soft_stdll-soft_specific.c
blob: 3edd4fa87ad818d20ce6316f9172b87651ccefa6 (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
--- usr/lib/pkcs11/soft_stdll/soft_specific.c.orig	2016-04-29 17:26:46 UTC
+++ usr/lib/pkcs11/soft_stdll/soft_specific.c
@@ -298,7 +298,9 @@
  
  
 ****************************************************************************/
+#ifndef _BSD_SOURCE
 #define _BSD_SOURCE
+#endif
 
 #include <pthread.h>
 #include <string.h>            // for memcmp() et al
@@ -317,7 +319,17 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
+#if defined(__OpenBSD__) || defined(__FreeBSD__)
+#include <sys/endian.h>
+#ifdef _BYTE_ORDER
+#define        __BYTE_ORDER    _BYTE_ORDER
+#endif
+#ifdef _LITTLE_ENDIAN
+#define        __LITTLE_ENDIAN _LITTLE_ENDIAN
+#endif
+#else
 #include <endian.h>
+#endif
 
 #include <openssl/des.h>
 #include <openssl/rand.h>