summaryrefslogtreecommitdiff
path: root/usr/src/lib/libc/port/gen/mkfifo.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/lib/libc/port/gen/mkfifo.c')
-rw-r--r--usr/src/lib/libc/port/gen/mkfifo.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/usr/src/lib/libc/port/gen/mkfifo.c b/usr/src/lib/libc/port/gen/mkfifo.c
index eb73e03184..ac2897c92a 100644
--- a/usr/src/lib/libc/port/gen/mkfifo.c
+++ b/usr/src/lib/libc/port/gen/mkfifo.c
@@ -20,28 +20,31 @@
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
+ * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
*/
/* Copyright (c) 1988 AT&T */
/* All Rights Reserved */
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* mkfifo(3c) - create a named pipe (FIFO). This code provides
* a POSIX mkfifo function.
- *
*/
-#pragma weak _mkfifo = mkfifo
-
#include "lint.h"
#include <sys/types.h>
#include <sys/stat.h>
int
+mkfifoat(int fd, const char *path, mode_t mode)
+{
+ mode &= 0777; /* only allow file access permissions */
+ mode |= S_IFIFO; /* creating a FIFO */
+ return (mknodat(fd, path, mode, 0));
+}
+
+#pragma weak _mkfifo = mkfifo
+int
mkfifo(const char *path, mode_t mode)
{
mode &= 0777; /* only allow file access permissions */