There's some problem with uname () - some systems like Solaris or Digital
1999-05-07 Martin Baulig <martin@home-of-linux.org> * server.c (main): There's some problem with uname () - some systems like Solaris or Digital Unix return a nonnegative value on success, some others like Linux return 0. Since all known systems seem to return a negative value on failure, we simply check whether the return value is not negative here.
This commit is contained in:
committed by
Martin Baulig
parent
217a1e92c6
commit
74d11991ab
@@ -68,7 +68,7 @@ main(int argc, char *argv[])
|
||||
uid = getuid (); euid = geteuid ();
|
||||
gid = getgid (); egid = getegid ();
|
||||
|
||||
if (uname (&uts)) _exit (1);
|
||||
if (uname (&uts) < 0) _exit (1);
|
||||
|
||||
if (strcmp (uts.sysname, LIBGTOP_COMPILE_SYSTEM) ||
|
||||
strcmp (uts.release, LIBGTOP_COMPILE_RELEASE) ||
|
||||
|
Reference in New Issue
Block a user