adding O_RDWR flag in the open()

According to the manual of open:
"The argument flags must include one of the following access modes:
O_RDONLY, O_WRONLY, or O_RDWR."
2 jobs for master in 1 minute and 43 seconds (queued for 15 seconds)
latest
Status Job ID Name Coverage
  Build
passed #809643
build-native

00:01:43

failed #809460
build-native

00:00:55