summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/posixshm.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/gen/posixshm.c')
-rw-r--r--lib/libc/gen/posixshm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/gen/posixshm.c b/lib/libc/gen/posixshm.c
index e437940..51713f2 100644
--- a/lib/libc/gen/posixshm.c
+++ b/lib/libc/gen/posixshm.c
@@ -29,6 +29,7 @@
* $FreeBSD$
*/
+#include "namespace.h"
#include <sys/types.h>
#include <sys/fcntl.h>
#include <sys/mman.h>
@@ -36,6 +37,7 @@
#include <errno.h>
#include <unistd.h>
+#include "un-namespace.h"
int
shm_open(const char *path, int flags, mode_t mode)
@@ -48,7 +50,7 @@ shm_open(const char *path, int flags, mode_t mode)
fd = _open(path, flags, mode);
if (fd != -1) {
- if (fstat(fd, &stab) != 0 || !S_ISREG(stab.st_mode)) {
+ if (_fstat(fd, &stab) != 0 || !S_ISREG(stab.st_mode)) {
_close(fd);
errno = EINVAL;
return (-1);
OpenPOWER on IntegriCloud