vcos: Remove timer_t fallback definition

The timer_t type is not used anywhere in the code. The fallback typedef
can break builds though on systems where timer_t exists but is not an
alias for __timer_t, such as systems using the musl libc.

Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
vcos: Fixed include for "HZ"

There is no guarantee that <sys/param.h> defines HZ. And in musl libc,
it doesn't. Since this is a Linux-specific constant, include the
Linux-specific header for it.

Note that HZ as defined by the system headers is the default value of
HZ (100), which might differ from the actual value of HZ in the kernel
config. Ideally userland would not use HZ at all and do all timing in
milliseconds instead.

Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
vmcs_host: Only check __USE_FILE_OFFSET64 when compiling against glibc

This looks like a sanity check that 64-bit file offset definitions were
indeed provided by the included headers. But __USE_FILE_OFFSET64 is an
internal define of glibc, so don't perform this check when compiling
with a different libc.

Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
vmcs_host: Correct type name for file mode

The type of "st_mode" in "struct stat" is "mode_t", not "__mode_t".

Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
containers: Fixed compile flags to select C99

Previously, "-D__STDC_VERSION__=199901L" was used to request C99
functionality from the system headers, but this does not tell the
compiler to provide C99 language features, so for example the
"restrict" keyword is not available then. This mismatch breaks the
build when using musl libc.

Instead we use "-std=c99" to select C99, but this has the side effect
of disabling non-standard APIs. So we have to manually re-select those.
The simplest way of doing so is "-D_DEFAULT_SOURCE", but that is not
universally supported yet by libcs, so for now I opted for the more
portable "-D_POSIX_C_SOURCE=199309L" to get access to clock_gettime()
and maybe other functionality not in the C99 standard.

Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
Merge pull request #201 from mthuurne/master

Compile fixes for building with musl libc