diff --git a/evconfig-private.h.cmake b/evconfig-private.h.cmake index 32f04794..1adf9c03 100644 --- a/evconfig-private.h.cmake +++ b/evconfig-private.h.cmake @@ -32,4 +32,9 @@ /* Define to 1 if you need to in order for `stat' and other things to work. */ #cmakedefine _POSIX_SOURCE 1 +/* Enable POSIX.2 extensions on QNX for getopt */ +#ifdef __QNX__ +#cmakedefine __EXT_POSIX2 1 +#endif + #endif diff --git a/evconfig-private.h.in b/evconfig-private.h.in index 7b3dfdb1..8cd64787 100644 --- a/evconfig-private.h.in +++ b/evconfig-private.h.in @@ -45,4 +45,11 @@ #undef _POSIX_SOURCE #endif +/* Enable POSIX.2 extensions on QNX for getopt */ +#ifdef __QNX__ +# ifndef __EXT_POSIX2 +# define __EXT_POSIX2 +# endif +#endif + #endif