diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | examples/Makefile | 2 | ||||
-rw-r--r-- | userspace/Makefile | 10 | ||||
-rw-r--r-- | userspace/ncrypto.h | 2 | ||||
-rw-r--r-- | userspace/ncrypto_fd.c | 2 | ||||
-rw-r--r-- | userspace/ncrypto_generate_params.c | 2 | ||||
-rw-r--r-- | userspace/ncrypto_key.c | 2 | ||||
-rw-r--r-- | userspace/ncrypto_masterkey.c | 2 | ||||
-rw-r--r-- | userspace/ncrypto_params.c | 2 | ||||
-rw-r--r-- | userspace/ncrypto_session.c | 2 |
10 files changed, 18 insertions, 9 deletions
@@ -19,5 +19,6 @@ scripts userspace/ncr-setkey userspace/libcryptodev.so userspace/libcryptodev.so.* +userspace/linux version.h tags diff --git a/examples/Makefile b/examples/Makefile index fb07989..33a67bc 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -1,5 +1,5 @@ CC = gcc -CFLAGS = -Wall -g -O2 +CFLAGS = -Wall -g -O2 -I../userspace GNUTLS_LDFLAGS = -L/usr/local/lib -lgnutls USERSPACE_LDFLAGS = -L../userspace -lcryptodev diff --git a/userspace/Makefile b/userspace/Makefile index b87bf0c..9156205 100644 --- a/userspace/Makefile +++ b/userspace/Makefile @@ -1,5 +1,5 @@ CC = gcc -CFLAGS = -Wall -g -O2 -fPIC +CFLAGS = -I. -Wall -g -O2 -fPIC progs := ncr-setkey @@ -15,5 +15,11 @@ libcryptodev.so: ${libobj} ln -sf libcryptodev.so.0.0 libcryptodev.so.0 ln -sf libcryptodev.so.0.0 libcryptodev.so +$(libobj): linux/ncr.h + +linux/ncr.h: ../ncr.h + mkdir -p linux + cp $< linux/ncr.h + clean: - rm -f *.o *~ libcryptodev.so* ncr-setkey + rm -rf *.o *~ libcryptodev.so* ncr-setkey linux diff --git a/userspace/ncrypto.h b/userspace/ncrypto.h index 9e32291..752824d 100644 --- a/userspace/ncrypto.h +++ b/userspace/ncrypto.h @@ -2,6 +2,8 @@ #ifndef __NCRYPT_H__ #define __NCRYPT_H__ +#include <linux/ncr.h> + #define NCR_DATA_GET_LAST 1 //#define NCR_DATA_SET_APPEND 1 #define NCR_SESSION_FINAL 1 diff --git a/userspace/ncrypto_fd.c b/userspace/ncrypto_fd.c index ce925cf..7e6741d 100644 --- a/userspace/ncrypto_fd.c +++ b/userspace/ncrypto_fd.c @@ -3,7 +3,7 @@ #include <fcntl.h> #include <pthread.h> #include <unistd.h> -#include "../ncr.h" +#include <linux/ncr.h> #include "ncrypto.h" int __ncr_file_descriptor = -1; diff --git a/userspace/ncrypto_generate_params.c b/userspace/ncrypto_generate_params.c index 5772aaf..9dd901d 100644 --- a/userspace/ncrypto_generate_params.c +++ b/userspace/ncrypto_generate_params.c @@ -2,7 +2,7 @@ #include <sys/types.h> #include <stdlib.h> #include <errno.h> -#include "../ncr.h" +#include <linux/ncr.h> #include "ncrypto.h" int diff --git a/userspace/ncrypto_key.c b/userspace/ncrypto_key.c index 924ac22..5321c78 100644 --- a/userspace/ncrypto_key.c +++ b/userspace/ncrypto_key.c @@ -3,7 +3,7 @@ #include <sys/ioctl.h> #include <string.h> #include <errno.h> -#include "../ncr.h" +#include <linux/ncr.h> #include "ncrypto.h" extern int __ncr_file_descriptor; diff --git a/userspace/ncrypto_masterkey.c b/userspace/ncrypto_masterkey.c index a5c55c3..5910ac0 100644 --- a/userspace/ncrypto_masterkey.c +++ b/userspace/ncrypto_masterkey.c @@ -3,7 +3,7 @@ #include <sys/ioctl.h> #include <string.h> #include <errno.h> -#include "../ncr.h" +#include <linux/ncr.h> #include "ncrypto.h" extern int __ncr_file_descriptor; diff --git a/userspace/ncrypto_params.c b/userspace/ncrypto_params.c index f5385f4..6fb49f2 100644 --- a/userspace/ncrypto_params.c +++ b/userspace/ncrypto_params.c @@ -3,7 +3,7 @@ #include <stdlib.h> #include <string.h> #include <errno.h> -#include "../ncr.h" +#include <linux/ncr.h> #include "ncrypto.h" int diff --git a/userspace/ncrypto_session.c b/userspace/ncrypto_session.c index e37aa21..e14dba2 100644 --- a/userspace/ncrypto_session.c +++ b/userspace/ncrypto_session.c @@ -3,7 +3,7 @@ #include <sys/ioctl.h> #include <string.h> #include <errno.h> -#include "../ncr.h" +#include <linux/ncr.h> #include "ncrypto.h" extern int __ncr_file_descriptor; |