wasi-libc/libc-bottom-half/cloudlibc/src/libc/fcntl/posix_fallocate.c
Dan Gohman cab0ec601e Remove __wasilibc_unmodified_upstream markers from libc-bottom-half.
We've already started removing this; this just removes all remaining
ones under the libc-bottom-half directory.

These markers were originally intended to help track upstream changes,
however in practice they created a lot of clutter and weren't that
helpful. And now, upstream cloudlibc is no longer active.
2021-02-04 21:22:15 -08:00

14 lines
307 B
C

// Copyright (c) 2015-2016 Nuxi, https://nuxi.nl/
//
// SPDX-License-Identifier: BSD-2-Clause
#include <wasi/api.h>
#include <errno.h>
#include <fcntl.h>
int posix_fallocate(int fd, off_t offset, off_t len) {
if (offset < 0 || len < 0)
return EINVAL;
return __wasi_fd_allocate(fd, offset, len);
}