[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT/NEWLIB PATCH v2 2/2] add declarations needed for vfscore in the gluecode
Signed-off-by: Yuri Volchkov <yuri.volchkov@xxxxxxxxx> --- include/fcntl.h | 36 ++++++++++++++++++++++++++++++++++++ include/sys/param.h | 8 ++++++++ include/sys/stat.h | 15 +++++++++++++++ include/sys/uio.h | 5 +++++ 4 files changed, 64 insertions(+) create mode 100644 include/fcntl.h create mode 100644 include/sys/param.h create mode 100644 include/sys/stat.h diff --git a/include/fcntl.h b/include/fcntl.h new file mode 100644 index 0000000..0d0ebcf --- /dev/null +++ b/include/fcntl.h @@ -0,0 +1,36 @@ +#ifndef _NEWLIB_GLUE_FCNTL_H_ +#define _NEWLIB_GLUE_FCNTL_H_ + +#include_next <fcntl.h> +#define loff_t off_t + +#include <uk/config.h> + +#if (defined CONFIG_ARCH_X86_64) +#define O_NOFOLLOW 0400000 +#define O_DIRECTORY 0200000 +#define O_CLOEXEC 02000000 +#define O_DSYNC 010000 +#endif + +#if ((defined CONFIG_ARCH_ARM_64) || (defined CONFIG_ARCH_ARM_32)) +#define O_NOFOLLOW 0100000 +#define O_DIRECTORY 040000 +#define O_CLOEXEC 02000000 +#define O_DSYNC 010000 +#endif + + +/* Glibc does not provide KEEP_SIZE and PUNCH_HOLE anymore. Instead it + * includes linux/falloc.h. + * + * Musl still does provide them. And Newlib is just does not care. + */ +#define FALLOC_FL_KEEP_SIZE 1 +#define FALLOC_FL_PUNCH_HOLE 2 + +#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) +#define AT_EMPTY_PATH 0x1000 +#endif + +#endif diff --git a/include/sys/param.h b/include/sys/param.h new file mode 100644 index 0000000..d877673 --- /dev/null +++ b/include/sys/param.h @@ -0,0 +1,8 @@ +#ifndef _NEWLIB_GLUE_SYS_PARAM_H_ +#define _NEWLIB_GLUE_SYS_PARAM_H_ + +#include_next <sys/param.h> + +#define MAXSYMLINKS 20 + +#endif diff --git a/include/sys/stat.h b/include/sys/stat.h new file mode 100644 index 0000000..5f88b8b --- /dev/null +++ b/include/sys/stat.h @@ -0,0 +1,15 @@ +#ifndef _NEWLIB_GLUE_SYS_STAT_H_ +#define _NEWLIB_GLUE_SYS_STAT_H_ + +#ifdef __rtems__ +#error "The __rtems__ is defined. Please revisit this header wrapper" +#endif + +#define __rtems__ +#include_next <sys/stat.h> +#undef __rtems__ + +#define UTIME_NOW 0x3fffffff +#define UTIME_OMIT 0x3ffffffe + +#endif diff --git a/include/sys/uio.h b/include/sys/uio.h index b83642e..3c821be 100644 --- a/include/sys/uio.h +++ b/include/sys/uio.h @@ -42,6 +42,11 @@ extern "C" { #define UIO_MAXIOV 1024 +struct iovec { + void *iov_base; + size_t iov_len; +}; + ssize_t readv(int fd, const struct iovec *iov, int iovcnt); ssize_t writev(int fd, const struct iovec *iov, int iovcnt); -- 2.19.2 _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |