From e85549ee1171e9a4fc28a0a09dec49f87741fa51 Mon Sep 17 00:00:00 2001 From: Alexander Nasonov Date: Sat, 10 Nov 2012 23:20:44 +0000 Subject: [PATCH] Fix NetBSD build. --- Makefile.system | 2 +- common.h | 5 +++++ exports/Makefile | 3 ++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile.system b/Makefile.system index 5aaf84609..27f30fa61 100644 --- a/Makefile.system +++ b/Makefile.system @@ -129,7 +129,7 @@ MD5SUM = md5 -r endif ifeq ($(OSNAME), NetBSD) -MD5SUM = md5 -r +MD5SUM = md5 -n endif ifeq ($(OSNAME), Linux) diff --git a/common.h b/common.h index b4dc5deba..003fde77f 100644 --- a/common.h +++ b/common.h @@ -351,7 +351,12 @@ typedef int blasint; #endif #define MMAP_ACCESS (PROT_READ | PROT_WRITE) + +#ifdef __NetBSD__ +#define MMAP_POLICY (MAP_PRIVATE | MAP_ANON) +#else #define MMAP_POLICY (MAP_PRIVATE | MAP_ANONYMOUS) +#endif #include "param.h" #include "common_param.h" diff --git a/exports/Makefile b/exports/Makefile index c507032e9..5219560ee 100644 --- a/exports/Makefile +++ b/exports/Makefile @@ -119,7 +119,8 @@ so : ../$(LIBSONAME) endif -ifeq ($(OSNAME), FreeBSD) +#http://stackoverflow.com/questions/7656425/makefile-ifeq-logical-or +ifeq ($(OSNAME), $(filter $(OSNAME),FreeBSD NetBSD)) so : ../$(LIBSONAME)