summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2011-11-20 14:20:03 +0000
committerCedric BAIL <cedric.bail@free.fr>2011-11-20 14:20:03 +0000
commit3294f60e16673a093c7d3fd812ed8df3410aba54 (patch)
treedc48b0944dbf8506fd263d0a690db998986887b3
parent5b30f24cc1295f4db42d9f5b985e6f98f63ace07 (diff)
downloadeet-3294f60e16673a093c7d3fd812ed8df3410aba54.tar.gz
eet: sys/mman.h is only needed when building with signature support.
SVN revision: 65441
-rw-r--r--src/lib/Makefile.am4
-rw-r--r--src/lib/eet_cipher.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
index 83489e8..4633749 100644
--- a/src/lib/Makefile.am
+++ b/src/lib/Makefile.am
@@ -65,7 +65,9 @@ eet_amalgamation.c: $(base_sources) Makefile
@echo "#include <limits.h>" >> eet_amalgamation.c
@echo "#include <sys/types.h>" >> eet_amalgamation.c
@echo "#include <sys/stat.h>" >> eet_amalgamation.c
- @echo "#include <sys/mman.h>" >> eet_amalgamation.c
+ @echo "#ifdef HAVE_SIGNATURE" >> eet_amalgamation.c
+ @echo "# include <sys/mman.h>" >> eet_amalgamation.c
+ @echo "#endif" >> eet_amalgamation.c
@echo "#include <setjmp.h>" >> eet_amalgamation.c
@echo "#include <errno.h>" >> eet_amalgamation.c
@echo "#include <time.h>" >> eet_amalgamation.c
diff --git a/src/lib/eet_cipher.c b/src/lib/eet_cipher.c
index 3f9895c..89ee65d 100644
--- a/src/lib/eet_cipher.c
+++ b/src/lib/eet_cipher.c
@@ -23,7 +23,6 @@ void *alloca(size_t);
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include <sys/mman.h>
#ifdef HAVE_UNISTD_H
# include <unistd.h>
@@ -34,6 +33,7 @@ void *alloca(size_t);
#endif /* ifdef HAVE_NETINET_IN_H */
#ifdef HAVE_SIGNATURE
+# include <sys/mman.h>
# ifdef HAVE_GNUTLS
# include <gnutls/gnutls.h>
# include <gnutls/x509.h>