about summary refs log tree commit diff
path: root/nss/nss_db/db-open.c
diff options
context:
space:
mode:
Diffstat (limited to 'nss/nss_db/db-open.c')
-rw-r--r--nss/nss_db/db-open.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/nss/nss_db/db-open.c b/nss/nss_db/db-open.c
index 42ce00fe3b..1c58bd1c54 100644
--- a/nss/nss_db/db-open.c
+++ b/nss/nss_db/db-open.c
@@ -36,11 +36,7 @@ internal_setent (const char *file, struct nss_db_map *mapping)
 {
   enum nss_status status = NSS_STATUS_UNAVAIL;
 
-  int mode = O_RDONLY | O_LARGEFILE;
-#ifdef O_CLOEXEC
-  mode |= O_CLOEXEC;
-#endif
-  int fd = open_not_cancel_2 (file, mode);
+  int fd = open_not_cancel_2 (file, O_RDONLY | O_LARGEFILE | O_CLOEXEC);
   if (fd != -1)
     {
       struct nss_db_header header;