OLD | NEW |
1 diff --git a/lib/getcwd.c b/lib/getcwd.c | 1 diff --git a/lib/getcwd.c b/lib/getcwd.c |
2 --- a/lib/getcwd.c | 2 --- a/lib/getcwd.c |
3 +++ b/lib/getcwd.c | 3 +++ b/lib/getcwd.c |
4 @@ -106,6 +106,14 @@ | 4 @@ -106,6 +106,14 @@ |
5 # define MATCHING_INO(dp, ino) true | 5 # define MATCHING_INO(dp, ino) true |
6 #endif | 6 #endif |
7 | 7 |
8 +#ifdef __native_client__ && defined _NEWLIB_VERSION | 8 +#if defined __native_client__ && defined _NEWLIB_VERSION |
9 +/* openat() is currently non-existent for newlib builds, but AT_FDCWD is | 9 +/* openat() is currently non-existent for newlib builds, but AT_FDCWD is |
10 + present in the headers. Explicatly undefine it here to avoid use of | 10 + present in the headers. Explicatly undefine it here to avoid use of |
11 + openat(). | 11 + openat(). |
12 + TODO(sbc): remove this once we fix this bug: http://crbug.com/436533 */ | 12 + TODO(sbc): remove this once we fix this bug: http://crbug.com/436533 */ |
13 +#undef AT_FDCWD | 13 +#undef AT_FDCWD |
14 +#endif | 14 +#endif |
15 + | 15 + |
16 #if !_LIBC | 16 #if !_LIBC |
17 # define __getcwd getcwd | 17 # define __getcwd getcwd |
18 # define __lstat lstat | 18 # define __lstat lstat |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 #include <prepargs.h> | 82 #include <prepargs.h> |
83 @@ -1617,7 +1618,7 @@ decode_options (int argc, char **argv) | 83 @@ -1617,7 +1618,7 @@ decode_options (int argc, char **argv) |
84 | 84 |
85 /* Main routine for tar. */ | 85 /* Main routine for tar. */ |
86 int | 86 int |
87 -main (int argc, char **argv) | 87 -main (int argc, char **argv) |
88 +nacl_main (int argc, char **argv) | 88 +nacl_main (int argc, char **argv) |
89 { | 89 { |
90 set_start_time (); | 90 set_start_time (); |
91 program_name = argv[0]; | 91 program_name = argv[0]; |
OLD | NEW |