168349Sobrien/*	$NetBSD: posix_fallocate.c,v 1.2 2016/06/30 15:29:20 dholland Exp $ */
268349Sobrien
368349Sobrien/*
468349Sobrien * Copyright (c) 2014 The NetBSD Foundation, Inc.
568349Sobrien * All rights reserved.
668349Sobrien *
768349Sobrien * This code is derived from software contributed to The NetBSD Foundation
868349Sobrien * by Emmanuel Dreyfus.
968349Sobrien *
1068349Sobrien * Redistribution and use in source and binary forms, with or without
1168349Sobrien * modification, are permitted provided that the following conditions
1268349Sobrien * are met:
1368349Sobrien * 1. Redistributions of source code must retain the above copyright
1468349Sobrien *    notice, this list of conditions and the following disclaimer.
1568349Sobrien * 2. Redistributions in binary form must reproduce the above copyright
1668349Sobrien *    notice, this list of conditions and the following disclaimer in the
1768349Sobrien *    documentation and/or other materials provided with the distribution.
1868349Sobrien * 3. The name of the author may not be used to endorse or promote products
1968349Sobrien *    derived from this software without specific prior written permission.
2068349Sobrien *
2168349Sobrien * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
2268349Sobrien * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
2368349Sobrien * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
2468349Sobrien * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
2568349Sobrien * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
2668349Sobrien * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
2768349Sobrien * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
2868349Sobrien * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
2968349Sobrien * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
3068349Sobrien * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3168349Sobrien * SUCH DAMAGE.
3268349Sobrien */
3368349Sobrien
3468349Sobrien#include <sys/cdefs.h>
3568349Sobrien#if defined(LIBC_SCCS) && !defined(lint)
3668349Sobrien__RCSID("$NetBSD: posix_fallocate.c,v 1.2 2016/06/30 15:29:20 dholland Exp $");
3768349Sobrien#endif /* LIBC_SCCS and not lint */
3868349Sobrien
3968349Sobrien#include <sys/types.h>
4068349Sobrien#include <sys/syscall.h>
4168349Sobrien#include <fcntl.h>
4268349Sobrien
4368349Sobrienint __posix_fallocate(int, int, off_t, off_t);
4468349Sobrien
4568349Sobrien/*
4668349Sobrien * 64-bit offset padding required for gcc 1.x
4768349Sobrien */
48int
49posix_fallocate(int fd, off_t off, off_t len)
50{
51	return __posix_fallocate(fd, 0, off, len);
52}
53