X-Git-Url: http://git.megacz.com/?p=nestedvm.git;a=blobdiff_plain;f=src%2Forg%2Fibex%2Fnestedvm%2Fsupport_aux.c;h=54181e9834bc77d6e4dfd192fa6ac1b9952f4536;hp=51251e73b924b62e355ea21febaca6fa4aac7800;hb=937f88333dca3f622bd9e2669e17e7473a447dd9;hpb=b0b715081de3e55b4d60b18a277b73ebaedd4a6f diff --git a/src/org/ibex/nestedvm/support_aux.c b/src/org/ibex/nestedvm/support_aux.c index 51251e7..54181e9 100644 --- a/src/org/ibex/nestedvm/support_aux.c +++ b/src/org/ibex/nestedvm/support_aux.c @@ -12,6 +12,10 @@ #include #include #include +#include +#include +#include +#include #include @@ -113,6 +117,7 @@ REENT_WRAPPER1(setgid,gid_t) REENT_WRAPPER1(setegid,gid_t) REENT_WRAPPER2(setgroups,int,const gid_t *) REENT_WRAPPER0R(setsid,pid_t) +REENT_WRAPPER1(fsync,int) extern int __execve_r(struct _reent *ptr, const char *path, char *const argv[], char *const envp[]); int _execve(const char *path, char *const argv[], char *const envp[]) { @@ -166,11 +171,6 @@ void sync() { /* do nothing*/ } -int fsync(int fd) { - /* do nothing */ - return 0; -} - char *ttyname(int fd) { return isatty(fd) ? "/dev/console" : NULL; } @@ -517,6 +517,11 @@ int vasprintf(char **ret, const char *fmt, va_list ap) { } } +// FIXME: This needs to be in a header +char *getlogin() { + return getenv("USER"); +} + /* * Other People's Code