]> xenbits.xensource.com Git - unikraft/libs/newlib.git/commitdiff
Import crypt.h and sys/eventfd.h from musl
authorCostin Lupu <costin.lupu@cs.pub.ro>
Wed, 30 Oct 2019 17:42:06 +0000 (19:42 +0200)
committerCostin Lupu <costin.lupu@cs.pub.ro>
Wed, 30 Oct 2019 19:41:32 +0000 (21:41 +0200)
Copied as is from the official musl git mirror
git://git.musl-libc.org/musl, commit 6fcb440d.

Signed-off-by: Costin Lupu <costin.lupu@cs.pub.ro>
Reviewed-by: Mihai Pogonaru <pogonarumihai@gmail.com>
musl-imported/include/crypt.h [new file with mode: 0644]
musl-imported/include/sys/eventfd.h [new file with mode: 0644]

diff --git a/musl-imported/include/crypt.h b/musl-imported/include/crypt.h
new file mode 100644 (file)
index 0000000..07de216
--- /dev/null
@@ -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 (file)
index 0000000..dc5c88f
--- /dev/null
@@ -0,0 +1,26 @@
+#ifndef _SYS_EVENTFD_H
+#define _SYS_EVENTFD_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <stdint.h>
+#include <fcntl.h>
+
+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 */