[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] make uname() more likely to work on solaris



Update of /home/or/cvsroot/src/common
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/common

Modified Files:
	util.c 
Log Message:
make uname() more likely to work on solaris
(linux says 0 is success, solaris says 1 is success)


Index: util.c
===================================================================
RCS file: /home/or/cvsroot/src/common/util.c,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -d -r1.67 -r1.68
--- util.c	20 Mar 2004 01:21:19 -0000	1.67
+++ util.c	20 Mar 2004 21:22:16 -0000	1.68
@@ -989,7 +989,8 @@
 #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';