Include <sys/unistd.h> for the definition of _SC_PAGESIZE, which is

required for run-time retrieval of SHMLBA.  While this does make visible
additional symbols which are not in the underscore-prefixed
implementation-reserved namespace, its impact should be negligible (and
most applications supposedly include <unistd.h> as well), and there is
prior art to that.  Fixes PR kern/19135 from Chris Demetriou.
This commit is contained in:
kleink 2003-05-30 20:31:34 +00:00
parent 0208373f7d
commit aac347de72
1 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: shm.h,v 1.32 2003/04/28 23:16:29 bjh21 Exp $ */
/* $NetBSD: shm.h,v 1.33 2003/05/30 20:31:34 kleink Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@ -86,6 +86,7 @@
#define SHMLBA PAGE_SIZE
#else
/* Use libc's internal __sysconf() to retrieve the machine's page size */
#include <sys/unistd.h> /* for _SC_PAGESIZE */
long __sysconf __P((int));
#define SHMLBA (__sysconf(_SC_PAGESIZE))
#endif