diff options
author | Norikatsu Shigemura <nork@FreeBSD.org> | 2010-11-07 12:07:17 +0000 |
---|---|---|
committer | Norikatsu Shigemura <nork@FreeBSD.org> | 2010-11-07 12:07:17 +0000 |
commit | c38e52a3c0b061b44ebb589d362563613f2edab8 (patch) | |
tree | e366bdd7e41998dca16600f03e415d6457bdbd42 /security/opencryptoki/files/patch-usr-lib-pkcs11-api-apiutil.c | |
parent | Add trousers 0.3.6, is a CPL (Common Public License) licensed Trusted (diff) |
Add opencryptoki 2.3.2, is an open PKCS#11 implementation library.
Obtained from: http://bsssd.sourceforge.net/
Notes
Notes:
svn path=/head/; revision=264183
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 | 44 |
1 files changed, 44 insertions, 0 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 new file mode 100644 index 000000000000..350878557631 --- /dev/null +++ b/security/opencryptoki/files/patch-usr-lib-pkcs11-api-apiutil.c @@ -0,0 +1,44 @@ +--- 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 @@ + #include <string.h> + #include <strings.h> + #include <unistd.h> +-#include <alloca.h> + #include <dlfcn.h> + #include <errno.h> + #include <sys/syslog.h> ++#include <limits.h> + + #include <sys/ipc.h> + +@@ -325,10 +325,28 @@ + #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> + + #define LIBLOCATION LIB_PATH |