lib/cobalt: Wrap __open_2/__open64_2 to support _FORTIFY_SOURCE

__open_2() and __open64_2() from glibc add runtime precondition tests for the
'oflag' parameter to the functionality of open()/open64(). They may be used when
the macro _FORTIFY_SOURCE is defined when compiling the application code. Added
these wrappers to cover those cases.

If Xenomai itself is not compiled with FORTIFY_SOURCE then the function
declarations for __open_2() and __open64_2() are not available.
__STD(__open_2(...)) will not link in this case (would be a very special
use case anyway?).

Signed-off-by: Jan Leupold <leupold@rsi-elektrotechnik.de>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
11 jobs for next in 30 minutes and 9 seconds (queued for 16 seconds)
Status Job ID Name Coverage
  Build
passed #148983
arm-4.14-release

00:26:21

passed #148982
arm-4.19-release

00:29:08

passed #148984
arm-4.4-cip-head

00:20:52

passed #148986
arm64-4.14-release

00:25:53

passed #148985
arm64-4.19-release

00:30:09

passed #148992
powerpc-4.19-release

00:14:16

passed #148989
x86-4.14-release

00:15:50

passed #148987
x86-4.19-cip-head

00:16:03

passed #148988
x86-4.19-cip-release

00:16:16

passed #148990
x86-4.4-cip-head

00:13:40

passed #148991
x86-4.4-cip-release

00:13:32