x42 / xjadeo

X JAck viDEo mOnitor: a tool that displays a video clip in sync with an external time source (jack-transport, LTC and MTC). Applications include: soundtrack composition/editing, video monitoring and -installations.
http://xjadeo.sf.net/
GNU General Public License v2.0
42 stars 7 forks source link

add missing fcntl.h include #21

Closed maxice8 closed 6 years ago

maxice8 commented 7 years ago

Systems that use musl-libc will fail to compile with the following error.

mqueue.c: In function 'mymq_init':
mqueue.c:58:26: error: 'O_RDONLY' undeclared (first use in this function)
  mqfd_r = mq_open(qname, O_RDONLY | O_CREAT | O_EXCL | O_NONBLOCK, S_IRWXU , NULL);
                          ^~~~~~~~
mqueue.c:58:26: note: each undeclared identifier is reported only once for each function it appears in
mqueue.c:58:37: error: 'O_CREAT' undeclared (first use in this function)
  mqfd_r = mq_open(qname, O_RDONLY | O_CREAT | O_EXCL | O_NONBLOCK, S_IRWXU , NULL);
                                     ^~~~~~~
mqueue.c:58:47: error: 'O_EXCL' undeclared (first use in this function)
  mqfd_r = mq_open(qname, O_RDONLY | O_CREAT | O_EXCL | O_NONBLOCK, S_IRWXU , NULL);
                                               ^~~~~~
mqueue.c:58:56: error: 'O_NONBLOCK' undeclared (first use in this function)
  mqfd_r = mq_open(qname, O_RDONLY | O_CREAT | O_EXCL | O_NONBLOCK, S_IRWXU , NULL);
                                                        ^~~~~~~~~~
mqueue.c:74:26: error: 'O_WRONLY' undeclared (first use in this function)
  mqfd_s = mq_open(qname, O_WRONLY | O_CREAT | O_EXCL | O_NONBLOCK, S_IRWXU , NULL);
                          ^~~~~~~~

O_* is declared on fcntl.h so add it to src/xjadeo/mqueue.c

Tested on x86_64 glibc and x86_64 musl Voidlinux systems

x42 commented 6 years ago

Rebased as 73b0c598c7f. Thanks (and sorry for the delay in merging this).