From 2e4c1818a350e15ee94f98081df9dceb78f513b9 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Sun, 30 Oct 2016 12:17:57 -0200 Subject: [PATCH] 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. --- libraries/AP_Common/missing/fcntl.h | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 libraries/AP_Common/missing/fcntl.h diff --git a/libraries/AP_Common/missing/fcntl.h b/libraries/AP_Common/missing/fcntl.h new file mode 100644 index 0000000000..a942f06a41 --- /dev/null +++ b/libraries/AP_Common/missing/fcntl.h @@ -0,0 +1,9 @@ +#include_next + +/* + * 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