build: uname on opensolaris returns 1 for success
authorAndrew Tridgell <tridge@samba.org>
Sun, 2 May 2010 14:12:14 +0000 (16:12 +0200)
committerAndrew Tridgell <tridge@samba.org>
Sun, 2 May 2010 16:25:13 +0000 (18:25 +0200)
check for -1 as failure, not 0 for success

buildtools/wafsamba/samba_conftests.py

index ecdf8e7abd2872a63ef36a1615f8e0744c9ef9ae..e709929ba967bd754332e1115fd320fbaa8c276f 100644 (file)
@@ -267,7 +267,7 @@ def CHECK_UNAME(conf):
     for v in "sysname machine release version".split():
         if not conf.CHECK_CODE('''
                                struct utsname n;
-                               if (uname(&n) != 0) return -1;
+                               if (uname(&n) == -1) return -1;
                                printf("%%s", n.%s);
                                ''' % v,
                                define='SYSTEM_UNAME_%s' % v.upper(),