summaryrefslogtreecommitdiffstats
path: root/lib/libc/iconv/citrus_mmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/iconv/citrus_mmap.c')
-rw-r--r--lib/libc/iconv/citrus_mmap.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/libc/iconv/citrus_mmap.c b/lib/libc/iconv/citrus_mmap.c
index dd5d059..2aaf73c 100644
--- a/lib/libc/iconv/citrus_mmap.c
+++ b/lib/libc/iconv/citrus_mmap.c
@@ -57,12 +57,8 @@ _citrus_map_file(struct _citrus_region * __restrict r,
_region_init(r, NULL, 0);
- if ((fd = open(path, O_RDONLY)) == -1)
+ if ((fd = open(path, O_RDONLY | O_CLOEXEC)) == -1)
return (errno);
- if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1) {
- ret = errno;
- goto error;
- }
if (fstat(fd, &st) == -1) {
ret = errno;
OpenPOWER on IntegriCloud