[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[tyndur-devel] [PATCH] libc: POSIX: Stub fuer gethostname
+ libc: POSIX: Stub fuer gethostname
---
src/modules/include/unistd.h | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/modules/include/unistd.h b/src/modules/include/unistd.h
index 010b0e2..5e331e2 100644
--- a/src/modules/include/unistd.h
+++ b/src/modules/include/unistd.h
@@ -153,6 +153,13 @@ gid_t getgid(void);
/// Gibt die effektive Gruppen-ID zurueck
gid_t getegid(void);
+/// Gibt den Hostnamen dieses Rechners zurueck
+#include <string.h>
+static inline int gethostname(char* buf, size_t len)
+{
+ strncpy(buf, "tyndur", len);
+}
+
#endif
#endif
--
1.6.0.2