Elvira Khabirova | 422f793 | 2015-08-19 05:28:48 +0300 | [diff] [blame] | 1 | #ifdef HAVE_CONFIG_H |
| 2 | # include "config.h" |
| 3 | #endif |
| 4 | |
| 5 | #ifdef HAVE_MQUEUE_H |
| 6 | |
| 7 | #include <fcntl.h> |
| 8 | #include <sys/stat.h> |
| 9 | #include <mqueue.h> |
| 10 | #include <stdlib.h> |
| 11 | #include <unistd.h> |
| 12 | |
| 13 | int |
| 14 | main (void) |
| 15 | { |
| 16 | struct mq_attr attr; |
| 17 | (void) close(0); |
| 18 | if (mq_open("/strace-mq.test", O_CREAT, S_IRWXU, 0) || |
| 19 | mq_getattr(0, &attr) || |
| 20 | mq_setattr(0, &attr, 0) || |
| 21 | mq_unlink("/strace-mq.test")) |
| 22 | return 77; |
| 23 | return 0; |
| 24 | } |
| 25 | |
| 26 | #else |
| 27 | |
| 28 | int |
| 29 | main(void) |
| 30 | { |
| 31 | return 77; |
| 32 | } |
| 33 | |
| 34 | #endif |