From: Michael Jeanson Date: Mon, 28 Sep 2015 14:17:23 +0000 (-0400) Subject: Port: uname can return a positive value on success X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=c2d6366f66dc29eb5d6e9419645c1b0ebb068ff8;p=deliverable%2Fbabeltrace.git Port: uname can return a positive value on success Signed-off-by: Michael Jeanson Signed-off-by: Jérémie Galarneau --- diff --git a/tests/lib/test_ctf_writer.c b/tests/lib/test_ctf_writer.c index b626a66f0..6d5b42db7 100644 --- a/tests/lib/test_ctf_writer.c +++ b/tests/lib/test_ctf_writer.c @@ -2845,7 +2845,8 @@ int main(int argc, char **argv) "bt_ctf_trace_get_environment_field_value successfully replaces an existing field"); BT_PUT(obj); - if (uname(&name)) { + /* On Solaris, uname() can return any positive value on success */ + if (uname(&name) < 0) { perror("uname"); return -1; }