[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 | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/modules/include/unistd.h b/src/modules/include/unistd.h
index 010b0e2..24b06b9 100644
--- a/src/modules/include/unistd.h
+++ b/src/modules/include/unistd.h
@@ -153,6 +153,14 @@ 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);
+ return 0;
+}
+
#endif
#endif
--
1.6.0.2