summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2016-04-07 17:00:58 +0200
committerSuren A. Chilingaryan <csa@suren.me>2016-04-07 17:00:58 +0200
commit5f13a1941af657f3512a48137a9b42b43c98b3e7 (patch)
treec0f34c65db6ff575cfd62e495e5f11fd5d4ce953
parentf5deda971481e64c19ad49adf681124ef1417273 (diff)
downloadpcitool-5f13a1941af657f3512a48137a9b42b43c98b3e7.tar.gz
pcitool-5f13a1941af657f3512a48137a9b42b43c98b3e7.tar.bz2
pcitool-5f13a1941af657f3512a48137a9b42b43c98b3e7.tar.xz
pcitool-5f13a1941af657f3512a48137a9b42b43c98b3e7.zip
Fix driver compilation on Ubuntu 14.04
-rw-r--r--driver/Makefile.in9
-rw-r--r--driver/umem.c2
2 files changed, 9 insertions, 2 deletions
diff --git a/driver/Makefile.in b/driver/Makefile.in
index 2f5238a..1bae633 100644
--- a/driver/Makefile.in
+++ b/driver/Makefile.in
@@ -62,8 +62,13 @@ default:
revision="Revision $$build_revision from $$build_branch by $$build_author at $$build_path, last modification from $$build_lastmod" ;\
/bin/echo -e "#define PCIDRIVER_BUILD \"$$build\"\\n#define PCIDRIVER_REVISION \"$$revision\"\\n#define PCIDRIVER_CHANGES \"$$build_changes\"\\n" > build.h ;\
else \
- grep "#define PCILIB_RELEASE" ../pcilib/build.h &> /dev/null ;\
- if [ $$? -eq 0 ]; then \
+ if [ -f ../pcilib/build.h ]; then \
+ grep "#define PCILIB_RELEASE" ../pcilib/build.h &> /dev/null ;\
+ res=$$? ;\
+ else \
+ res=-1 ;\
+ fi ;\
+ if [ $$res -eq 0 ]; then \
revision="Release \" PCILIB_RELEASE \" (r\" PCILIB_REVISION \") from \" PCILIB_REVISION_BRANCH \" by \" PCILIB_REVISION_AUTHOR \" at $$build_path, last modification from $$build_lastmod" ;\
/bin/echo -e "#include \"pcilib/build.h\"\\n#define PCIDRIVER_BUILD \"$$build\"\\n#define PCIDRIVER_REVISION \"$$revision\"\\n#define PCIDRIVER_CHANGES PCILIB_REVISION_MODIFICATIONS\n" > build.h ;\
else \
diff --git a/driver/umem.c b/driver/umem.c
index d8be358..8d73207 100644
--- a/driver/umem.c
+++ b/driver/umem.c
@@ -17,6 +17,8 @@
#include <linux/mm.h>
#include <linux/pagemap.h>
#include <linux/sched.h>
+#include <linux/vmalloc.h>
+
#include "base.h"