diff --git a/src/lib/drivers/device/posix/cdev_platform.cpp b/src/lib/drivers/device/posix/cdev_platform.cpp index 38b7e5bfe8..fe6e4f0439 100644 --- a/src/lib/drivers/device/posix/cdev_platform.cpp +++ b/src/lib/drivers/device/posix/cdev_platform.cpp @@ -162,7 +162,7 @@ extern "C" { int i; mode_t mode; - if (!dev && (flags & (PX4_F_WRONLY | PX4_F_CREAT)) != 0 && + if (!dev && (flags & PX4_F_WRONLY) != 0 && strncmp(path, "/obj/", 5) != 0 && strncmp(path, "/dev/", 5) != 0) { va_list p; diff --git a/src/platforms/px4_posix.h b/src/platforms/px4_posix.h index 587dfe63be..3222e1b4ac 100644 --- a/src/platforms/px4_posix.h +++ b/src/platforms/px4_posix.h @@ -55,12 +55,11 @@ #include "px4_sem.h" - -#ifdef __PX4_NUTTX - #define PX4_F_RDONLY 1 #define PX4_F_WRONLY 2 +#ifdef __PX4_NUTTX + typedef struct pollfd px4_pollfd_struct_t; #if defined(__cplusplus) @@ -82,9 +81,6 @@ typedef struct pollfd px4_pollfd_struct_t; #elif defined(__PX4_POSIX) -#define PX4_F_RDONLY O_RDONLY -#define PX4_F_WRONLY O_WRONLY -#define PX4_F_CREAT O_CREAT #define PX4_STACK_OVERHEAD 8192 __BEGIN_DECLS