Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(621)

Unified Diff: libio/iofdopen.c

Issue 338613003: Disable use of fcntl in fdopen for nacl. (Closed) Base URL: http://git.chromium.org/native_client/nacl-glibc.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: libio/iofdopen.c
diff --git a/libio/iofdopen.c b/libio/iofdopen.c
index 0c449ed75b4b91b4791f1399b141a984d1a9af26..ccef8c11a1aabd4f21f2b5704fe8e20dd0c0cf75 100644
--- a/libio/iofdopen.c
+++ b/libio/iofdopen.c
@@ -59,7 +59,9 @@ _IO_new_fdopen (fd, mode)
#endif
struct _IO_wide_data wd;
} *new_f;
+#if !defined(__native_client__)
int fd_flags;
+#endif /* !defined(__native_client__) */
int i;
int use_mmap = 0;
@@ -99,6 +101,11 @@ _IO_new_fdopen (fd, mode)
}
break;
}
+/*
+ * Don't attempt to verify fd mode under Native Client,
+ * as fcntl is not implemented.
+ */
+#if !defined(__native_client__)
#ifdef F_GETFL
fd_flags = _IO_fcntl (fd, F_GETFL);
#ifndef O_ACCMODE
@@ -138,6 +145,7 @@ _IO_new_fdopen (fd, mode)
return NULL;
}
#endif
+#endif /* !defined(__native_client__) */
new_f = (struct locked_FILE *) malloc (sizeof (struct locked_FILE));
if (new_f == NULL)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698