am dcc18ea4: Merge "Add C linkage for __open_2 and __openat_2."

* commit 'dcc18ea4c685230087618c12e8f20484b314596f':
  Add C linkage for __open_2 and __openat_2.
This commit is contained in:
Ben Cheng 2013-12-19 11:05:15 -08:00 committed by Android Git Automerger
commit e884a039db

View File

@ -50,7 +50,7 @@ int open(const char* pathname, int flags, ...) {
return __openat(AT_FDCWD, pathname, flags, mode); return __openat(AT_FDCWD, pathname, flags, mode);
} }
int __open_2(const char* pathname, int flags) { extern "C" int __open_2(const char* pathname, int flags) {
if (__predict_false(flags & O_CREAT)) { if (__predict_false(flags & O_CREAT)) {
__fortify_chk_fail("open(O_CREAT): called without specifying a mode", 0); __fortify_chk_fail("open(O_CREAT): called without specifying a mode", 0);
} }
@ -75,7 +75,7 @@ int openat(int fd, const char *pathname, int flags, ...) {
return __openat(fd, pathname, flags, mode); return __openat(fd, pathname, flags, mode);
} }
int __openat_2(int fd, const char* pathname, int flags) { extern "C" int __openat_2(int fd, const char* pathname, int flags) {
if (flags & O_CREAT) { if (flags & O_CREAT) {
__fortify_chk_fail("openat(O_CREAT): called without specifying a mode", 0); __fortify_chk_fail("openat(O_CREAT): called without specifying a mode", 0);
} }