On some platforms, O_RDONLY is not a flag to be checked, but merely the absence of O_RDWR and O_WRONLY.
The POSIX specification does not mandate how these 3 flags must be specified,
only that one of the three must be specified in every call.
........
Merged revisions 363209 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 363212 from http://svn.asterisk.org/svn/asterisk/branches/10
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@363215
65c4cc65-6c06-0410-ace0-
fbb531ad65f3