From: Costin Lupu Date: Wed, 30 Oct 2019 17:42:06 +0000 (+0200) Subject: Import crypt.h and sys/eventfd.h from musl X-Git-Tag: RELEASE-0.4~20 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=ff3db3a65317589ebe9920a5c14544703cfc3d1d;p=unikraft%2Flibs%2Fnewlib.git Import crypt.h and sys/eventfd.h from musl Copied as is from the official musl git mirror git://git.musl-libc.org/musl, commit 6fcb440d. Signed-off-by: Costin Lupu Reviewed-by: Mihai Pogonaru --- diff --git a/musl-imported/include/crypt.h b/musl-imported/include/crypt.h new file mode 100644 index 0000000..07de216 --- /dev/null +++ b/musl-imported/include/crypt.h @@ -0,0 +1,20 @@ +#ifndef _CRYPT_H +#define _CRYPT_H + +#ifdef __cplusplus +extern "C" { +#endif + +struct crypt_data { + int initialized; + char __buf[256]; +}; + +char *crypt(const char *, const char *); +char *crypt_r(const char *, const char *, struct crypt_data *); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/musl-imported/include/sys/eventfd.h b/musl-imported/include/sys/eventfd.h new file mode 100644 index 0000000..dc5c88f --- /dev/null +++ b/musl-imported/include/sys/eventfd.h @@ -0,0 +1,26 @@ +#ifndef _SYS_EVENTFD_H +#define _SYS_EVENTFD_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include + +typedef uint64_t eventfd_t; + +#define EFD_SEMAPHORE 1 +#define EFD_CLOEXEC O_CLOEXEC +#define EFD_NONBLOCK O_NONBLOCK + +int eventfd(unsigned int, int); +int eventfd_read(int, eventfd_t *); +int eventfd_write(int, eventfd_t); + + +#ifdef __cplusplus +} +#endif + +#endif /* sys/eventfd.h */