about summary refs log tree commit diff
path: root/rt/tst-mqueue2.c
diff options
context:
space:
mode:
Diffstat (limited to 'rt/tst-mqueue2.c')
-rw-r--r--rt/tst-mqueue2.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/rt/tst-mqueue2.c b/rt/tst-mqueue2.c
index 18fadfe09c..b355d22474 100644
--- a/rt/tst-mqueue2.c
+++ b/rt/tst-mqueue2.c
@@ -27,6 +27,7 @@
 #include <sys/wait.h>
 #include <time.h>
 #include <unistd.h>
+#include <support/check.h>
 #include "tst-mqueue.h"
 
 static void
@@ -48,11 +49,14 @@ do_test (void)
 
   if (q == (mqd_t) -1)
     {
+      if (errno == ENOSYS)
+	FAIL_UNSUPPORTED ("mq_open not supported");
+
       printf ("mq_open failed with: %m\n");
-      return result;
+      return 1;
     }
-  else
-    add_temp_mq (name);
+
+  add_temp_mq (name);
 
   mqd_t q2 = mq_open (name, O_CREAT | O_EXCL | O_RDWR, 0600, &attr);
   if (q2 != (mqd_t) -1)