[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Minios-devel] [UNIKRAFT/NEWLIB PATCH 08/16] sys/un.h: Import from musl
Hello Costin,
Unfortunately, I get a compilation error when using sys/un.h header. There is no features.h header in Unikraft which It seems is needed for sa_family_t type in
struct sockaddr_un.
Thank you,
Charalampos Mainas
From: Costin Lupu <costin.lupu@xxxxxxxxx>
Sent: Thursday, August 22, 2019 12:10 PM
To: minios-devel@xxxxxxxxxxxxx
Cc: Felipe Huici; Charalampos Mainas
Subject: [UNIKRAFT/NEWLIB PATCH 08/16] sys/un.h: Import from musl
Copied as is from the official musl git mirror
git://git.musl-libc.org/musl, commit 6fcb440d.
Signed-off-by: Costin Lupu <costin.lupu@xxxxxxxxx>
---
musl-imported/include/sys/un.h | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
create mode 100644 musl-imported/include/sys/un.h
diff --git a/musl-imported/include/sys/un.h b/musl-imported/include/sys/un.h
new file mode 100644
index 0000000..1a3193a
--- /dev/null
+++ b/musl-imported/include/sys/un.h
@@ -0,0 +1,31 @@
+#ifndef _SYS_UN_H
+#define _SYS_UN_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <features.h>
+
+#define __NEED_sa_family_t
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+#define __NEED_size_t
+#endif
+
+#include <bits/alltypes.h>
+
+struct sockaddr_un {
+ sa_family_t sun_family;
+ char sun_path[108];
+};
+
+#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+size_t strlen(const char *);
+#define SUN_LEN(s) (2+strlen((s)->sun_path))
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
--
2.20.1
|
_______________________________________________
Minios-devel mailing list
Minios-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/minios-devel
|