Handle systems missing <sys/cdefs.h>

This is a non-portable header, and we cannot expect it to be provided by
the system libc (e.g. musl). We just need and rely on declaration that
we have defined ourselves in our own <bsd/sys/cdefs.h>. So we switch to
only ever assume that.

Fixes: https://bugs.freedesktop.org/105281
This commit is contained in:
Guillem Jover
2018-03-06 01:41:35 +01:00
parent 5ba8c5bab0
commit 11ec8f1e5d
12 changed files with 49 additions and 0 deletions

View File

@@ -42,7 +42,11 @@
#ifndef LIBBSD_STDLIB_H
#define LIBBSD_STDLIB_H
#ifdef LIBBSD_OVERLAY
#include <sys/cdefs.h>
#else
#include <bsd/sys/cdefs.h>
#endif
#include <sys/stat.h>
#include <stdint.h>