From 365eee4a8b97fbca028ce3a5f2bc39cb478910a3 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Sat, 22 Jan 2005 17:58:32 +0000 Subject: [PATCH] Don't include uname() when being built for Haiku. Actually the whole file should not be included, but if simply left out, linking libnet will fail, complaining about a missing _h_errnop(). git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10956 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/network/libnet/compat.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/kits/network/libnet/compat.c b/src/kits/network/libnet/compat.c index 901cfbd57c..d0b29bd841 100644 --- a/src/kits/network/libnet/compat.c +++ b/src/kits/network/libnet/compat.c @@ -141,6 +141,10 @@ _EXPORT int getpassword(char * pwd, size_t length) return strlen(pwd); } +// TODO: This is not a good solution. The complete compat.c should not be +// included in a libnet.so for Haiku, but if left out, _h_errnop is missing +// when linking. +#ifndef __HAIKU__ struct utsname { char sysname[32]; @@ -162,3 +166,5 @@ _EXPORT int uname(struct utsname *name) strcpy(name->machine, "BePC"); return B_OK; } + +#endif // !defined(__HAIKU__)