NetBSD: enable detection of posix_fallocate()

posix_fallocate() is declared in unistd.h on NetBSD. Add the include
for proper detection on NetBSD 7.0 and up.

See http://netbsd.gw.com/cgi-bin/man-cgi?posix_fallocate++NetBSD-current

As that is violating the POSIX standards, a PR was opened at NetBSD
under http://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=51287
for further tracking of the issue.

Change-Id: I40ec320677eef37bbc39f58e0bbac34f8cf7b8da
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Ralf Nolden 2016-06-27 10:25:42 +02:00
parent b3b2f502e9
commit fe9ca6ede8

View File

@ -32,6 +32,10 @@
****************************************************************************/
#include <fcntl.h>
// NetBSD 7 has posix_fallocate, but in unistd.h instead of fcntl.h
#ifdef __NetBSD__
# include <unistd.h>
#endif
int main(int, char **)
{