From 4e9cb032d1eab7ceaef47f4d5104d2c42d556ce2 Mon Sep 17 00:00:00 2001 From: JP Abgrall Date: Thu, 9 Jan 2014 14:06:20 -0800 Subject: [PATCH] Add extra libc stubs for mntent related functions. This adds stubs for setmntent() and endmntent(). Change-Id: I6ccaa044145405cd7226c1c54a25d435c96a2308 --- libc/bionic/stubs.cpp | 10 ++++++++++ libc/include/mntent.h | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/libc/bionic/stubs.cpp b/libc/bionic/stubs.cpp index 6edaa19e7..707036a89 100644 --- a/libc/bionic/stubs.cpp +++ b/libc/bionic/stubs.cpp @@ -447,6 +447,16 @@ mntent* getmntent(FILE* /*f*/) { return NULL; } +FILE* setmntent(const char*, const char*) { + UNIMPLEMENTED; + return NULL; +} + +int endmntent(FILE*) { + UNIMPLEMENTED; + return 1; /* Allways returns 1 according to man */ +} + char* ttyname(int /*fd*/) { // NOLINT: implementing bad function. UNIMPLEMENTED; return NULL; diff --git a/libc/include/mntent.h b/libc/include/mntent.h index 8b87f718d..6cc0b186b 100644 --- a/libc/include/mntent.h +++ b/libc/include/mntent.h @@ -30,7 +30,9 @@ #include #include +#include /* for _PATH_MOUNTED */ +#define MOUNTED _PATH_MOUNTED #define MNTTYPE_IGNORE "ignore" struct mntent @@ -48,6 +50,8 @@ __BEGIN_DECLS struct mntent* getmntent(FILE*); +FILE* setmntent(const char*, const char*); +int endmntent(FILE*); __END_DECLS -- 2.11.0