summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-03-20 21:22:16 +0000
committerRoger Dingledine <arma@torproject.org>2004-03-20 21:22:16 +0000
commitd10fcc89ecfd722039b9939fea84cb3964890c2e (patch)
tree25fe2c78a7466e21f0bf326cf53c6acfbe0b183c
parent49a221500dbb29c0810ae304ed0867ea7511a178 (diff)
downloadtor-d10fcc89ecfd722039b9939fea84cb3964890c2e.tar.gz
tor-d10fcc89ecfd722039b9939fea84cb3964890c2e.zip
make uname() more likely to work on solaris
(linux says 0 is success, solaris says 1 is success) svn:r1322
-rw-r--r--src/common/util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/util.c b/src/common/util.c
index dcbbfa0005..615781a465 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -989,7 +989,8 @@ get_uname(void)
#endif
if (!uname_result_is_set) {
#ifdef HAVE_UNAME
- if (!uname((&u))) {
+ if (uname(&u) != -1) {
+ /* (linux says 0 is success, solaris says 1 is success) */
snprintf(uname_result, 255, "%s %s %s",
u.sysname, u.nodename, u.machine);
uname_result[255] = '\0';