projects
/
nestedvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix the java source compiler
[nestedvm.git]
/
src
/
org
/
ibex
/
nestedvm
/
support_aux.c
diff --git
a/src/org/ibex/nestedvm/support_aux.c
b/src/org/ibex/nestedvm/support_aux.c
index
51251e7
..
54181e9
100644
(file)
--- a/
src/org/ibex/nestedvm/support_aux.c
+++ b/
src/org/ibex/nestedvm/support_aux.c
@@
-12,6
+12,10
@@
#include <sys/sysctl.h>
#include <sys/utsname.h>
#include <paths.h>
#include <sys/sysctl.h>
#include <sys/utsname.h>
#include <paths.h>
+#include <ctype.h>
+#include <pwd.h>
+#include <grp.h>
+#include <stdarg.h>
#include <nestedvm/socket.h>
#include <nestedvm/socket.h>
@@
-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(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[]) {
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*/
}
/* do nothing*/
}
-int fsync(int fd) {
- /* do nothing */
- return 0;
-}
-
char *ttyname(int fd) {
return isatty(fd) ? "/dev/console" : NULL;
}
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
/*
* Other People's Code