make this build and return 77 if there is no mmap

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11362 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
2002-09-04 03:25:06 +00:00
parent e9e19e129c
commit 92aa909ab6

View File

@@ -37,7 +37,9 @@ RCSID("$Id$");
#endif #endif
#include <sys/types.h> #include <sys/types.h>
#ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h> #include <sys/mman.h>
#endif
#include <fcntl.h> #include <fcntl.h>
#include "roken.h" #include "roken.h"
@@ -75,6 +77,10 @@ segv_handler(int sig)
int int
main(int argc, char **argv) main(int argc, char **argv)
{ {
#ifndef HAVE_MMAP
return 77; /* signal to automake that this test
cannot be run */
#else /* HAVE_MMAP */
int ret; int ret;
int i; int i;
struct sigaction sa; struct sigaction sa;
@@ -119,4 +125,5 @@ main(int argc, char **argv)
err (1, "munmap"); err (1, "munmap");
} }
return val; return val;
#endif /* HAVE_MMAP */
} }