posix.c (backtrace_open): Cast second argument of open() to int.

2015-09-17  Ian Lance Taylor  <iant@google.com>

        * posix.c (backtrace_open): Cast second argument of open() to int.

From-SVN: r227881
This commit is contained in:
Ian Lance Taylor 2015-09-17 17:08:04 +00:00 committed by David Edelsohn
parent 1eb50e95fb
commit 750cdaf713
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2015-09-17 Ian Lance Taylor <iant@google.com>
* posix.c (backtrace_open): Cast second argument of open() to int.
2015-09-11 Ian Lance Taylor <iant@google.com>
* Makefile.am (backtrace.lo): Depend on internal.h.

View File

@ -64,7 +64,7 @@ backtrace_open (const char *filename, backtrace_error_callback error_callback,
if (does_not_exist != NULL)
*does_not_exist = 0;
descriptor = open (filename, O_RDONLY | O_BINARY | O_CLOEXEC);
descriptor = open (filename, (int) (O_RDONLY | O_BINARY | O_CLOEXEC));
if (descriptor < 0)
{
if (does_not_exist != NULL && errno == ENOENT)