AP_Common: add missing O_CLOEXEC definition

O_CLOEXEC is not available on Nuttx, nor it makes sense there. Define it
as 0, so we can use it in code.
This commit is contained in:
Lucas De Marchi 2016-10-30 12:17:57 -02:00
parent 57aec40acb
commit 2e4c1818a3

View File

@ -0,0 +1,9 @@
#include_next <fcntl.h>
/*
* we only want to define as 0 for those targets in which it doesn't make
* sense
*/
#if defined(HAVE_OCLOEXEC) && HAVE_OCLOEXEC == 0
#define O_CLOEXEC 0
#endif