diff options
Diffstat (limited to 'security/opencryptoki/files/patch-usr-lib-pkcs11-api-apiutil.c')
-rw-r--r-- | security/opencryptoki/files/patch-usr-lib-pkcs11-api-apiutil.c | 32 |
1 files changed, 5 insertions, 27 deletions
diff --git a/security/opencryptoki/files/patch-usr-lib-pkcs11-api-apiutil.c b/security/opencryptoki/files/patch-usr-lib-pkcs11-api-apiutil.c index 350878557631..12ad45d9473a 100644 --- a/security/opencryptoki/files/patch-usr-lib-pkcs11-api-apiutil.c +++ b/security/opencryptoki/files/patch-usr-lib-pkcs11-api-apiutil.c @@ -1,6 +1,6 @@ ---- usr/lib/pkcs11/api/apiutil.c.orig 2010-07-29 21:28:41.000000000 +0900 -+++ usr/lib/pkcs11/api/apiutil.c 2010-10-19 23:54:52.374982634 +0900 -@@ -305,10 +305,10 @@ +--- usr/lib/pkcs11/api/apiutil.c.orig 2016-04-29 17:26:45 UTC ++++ usr/lib/pkcs11/api/apiutil.c +@@ -298,10 +298,10 @@ #include <string.h> #include <strings.h> #include <unistd.h> @@ -12,33 +12,11 @@ #include <sys/ipc.h> -@@ -325,10 +325,28 @@ +@@ -314,7 +314,6 @@ #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> -#include <sys/file.h> - static int xplfd=-1; - #endif -+#ifdef __sun -+#define LOCK_EX F_LOCK -+#define LOCK_UN F_ULOCK -+#define flock(fd, func) lockf(fd, func, 0) -+#endif -+ -+#ifndef LOCK_SH -+#define LOCK_SH 1 /* shared lock */ -+#endif -+#ifndef LOCK_EX -+#define LOCK_EX 2 /* exclusive lock */ -+#endif -+#ifndef LOCK_NB -+#define LOCK_NB 4 /* don't block when locking */ -+#endif -+#ifndef LOCK_UN -+#define LOCK_UN 8 /* unlock */ -+#endif -+ - #include <libgen.h> + static int xplfd = -1; - #define LIBLOCATION LIB_PATH |