fix compilation for VM_MIN_ADDRESS == 0

This commit is contained in:
christos 2011-08-26 06:56:11 +00:00
parent ae56ae8f3f
commit 012b2b9c3c

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_exec.c,v 1.319 2011/08/25 19:54:30 reinoud Exp $ */
/* $NetBSD: kern_exec.c,v 1.320 2011/08/26 06:56:11 christos Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.319 2011/08/25 19:54:30 reinoud Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.320 2011/08/26 06:56:11 christos Exp $");
#include "opt_ktrace.h"
#include "opt_modular.h"
@ -377,6 +377,7 @@ check_exec(struct lwp *l, struct exec_package *epp, struct pathbuf *pb)
error = ENOEXEC;
break;
}
#if VM_MIN_ADDRESS > 0
/* Seems ok: check that entry point is not too low */
if (epp->ep_entry < VM_MIN_ADDRESS) {
aprint_verbose("check_exec: rejecting due to "
@ -384,6 +385,7 @@ check_exec(struct lwp *l, struct exec_package *epp, struct pathbuf *pb)
error = ENOEXEC;
break;
}
#endif
/* check limits */
if ((epp->ep_tsize > MAXTSIZ) ||