Define __EXT_POSIX2 for QNX

POSIX 1003.2 extension is necessary for getopt interface.
Reported here [1] (not mine, I can't test)

  [1]: https://mail-index.netbsd.org/pkgsrc-users/2017/09/20/msg025601.html

Closes: #563 (cherry-pick)
This commit is contained in:
Maya Rashish 2017-09-23 06:57:16 +03:00 committed by Azat Khuzhin
parent 9fe952a0ae
commit 99a3887d66
No known key found for this signature in database
GPG Key ID: B86086848EF8686D
2 changed files with 12 additions and 0 deletions

View File

@ -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

View File

@ -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