From d10fcc89ecfd722039b9939fea84cb3964890c2e Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Sat, 20 Mar 2004 21:22:16 +0000 Subject: make uname() more likely to work on solaris (linux says 0 is success, solaris says 1 is success) svn:r1322 --- src/common/util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/util.c b/src/common/util.c index dcbbfa000..615781a46 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'; -- cgit v1.2.3