Chromium Code Reviews

Unified Diff: fusl/src/mq/mq_open.c

Issue 1573973002: Add a "fork" of musl as //fusl. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « fusl/src/mq/mq_notify.c ('k') | fusl/src/mq/mq_receive.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fusl/src/mq/mq_open.c
diff --git a/fusl/src/mq/mq_open.c b/fusl/src/mq/mq_open.c
new file mode 100644
index 0000000000000000000000000000000000000000..aa91d589108fbd05757ba8c04afaa43e8711d743
--- /dev/null
+++ b/fusl/src/mq/mq_open.c
@@ -0,0 +1,19 @@
+#include <mqueue.h>
+#include <fcntl.h>
+#include <stdarg.h>
+#include "syscall.h"
+
+mqd_t mq_open(const char *name, int flags, ...)
+{
+ mode_t mode = 0;
+ struct mq_attr *attr = 0;
+ if (*name == '/') name++;
+ if (flags & O_CREAT) {
+ va_list ap;
+ va_start(ap, flags);
+ mode = va_arg(ap, mode_t);
+ attr = va_arg(ap, struct mq_attr *);
+ va_end(ap);
+ }
+ return syscall(SYS_mq_open, name, flags, mode, attr);
+}
« no previous file with comments | « fusl/src/mq/mq_notify.c ('k') | fusl/src/mq/mq_receive.c » ('j') | no next file with comments »

Powered by Google App Engine