X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fbsd-os.c;h=0bca439361f08c2c28e8120babb20c5176703183;hb=095564c28a259002c7e34fd1d861f5bbd0a959b6;hp=552b0c24d00c832bc4c7381bb046c41bbe722e7a;hpb=4f9ca5ebd934f060f099ce12cd9a3851ba1fc990;p=sbcl.git diff --git a/src/runtime/bsd-os.c b/src/runtime/bsd-os.c index 552b0c2..0bca439 100644 --- a/src/runtime/bsd-os.c +++ b/src/runtime/bsd-os.c @@ -37,12 +37,12 @@ #include /* #include */ #include "validate.h" - os_vm_size_t os_vm_page_size; #ifdef __NetBSD__ #include +#include #include static void netbsd_init(); @@ -232,6 +232,21 @@ os_install_interrupt_handlers(void) static void netbsd_init() { struct rlimit rl; + int mib[2], osrev; + size_t len; + + /* Are we running on a sufficiently functional kernel? */ + mib[0] = CTL_KERN; + mib[1] = KERN_OSREV; + + len = sizeof(osrev); + sysctl(mib, 2, &osrev, &len, NULL, 0); + + /* If we're older than 2.0... */ + if (osrev < 200000000) { + fprintf(stderr, "osrev = %d (needed at least 200000000).\n", osrev); + lose("NetBSD kernel too old to run sbcl.\n"); + } /* NetBSD counts mmap()ed space against the process's data size limit, * so yank it up. This might be a nasty thing to do? */