mirror of
https://gitlab.freedesktop.org/libbsd/libbsd.git
synced 2025-02-13 12:01:21 +01:00
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:
parent
5ba8c5bab0
commit
11ec8f1e5d
@ -40,7 +40,11 @@
|
||||
#define LIBBSD_LIBUTIL_H
|
||||
|
||||
#include <features.h>
|
||||
#ifdef LIBBSD_OVERLAY
|
||||
#include <sys/cdefs.h>
|
||||
#else
|
||||
#include <bsd/sys/cdefs.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
@ -27,7 +27,11 @@ typedef struct MD5Context {
|
||||
uint8_t buffer[MD5_BLOCK_LENGTH]; /* input buffer */
|
||||
} MD5_CTX;
|
||||
|
||||
#ifdef LIBBSD_OVERLAY
|
||||
#include <sys/cdefs.h>
|
||||
#else
|
||||
#include <bsd/sys/cdefs.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
@ -27,7 +27,11 @@
|
||||
#ifndef LIBBSD_NLIST_H
|
||||
#define LIBBSD_NLIST_H
|
||||
|
||||
#ifdef LIBBSD_OVERLAY
|
||||
#include <sys/cdefs.h>
|
||||
#else
|
||||
#include <bsd/sys/cdefs.h>
|
||||
#endif
|
||||
|
||||
struct nlist {
|
||||
union {
|
||||
|
@ -31,7 +31,11 @@
|
||||
#define RPP_SEVENBIT 0x10 /* Strip the high bit from input. */
|
||||
#define RPP_STDIN 0x20 /* Read from stdin, not /dev/tty */
|
||||
|
||||
#ifdef LIBBSD_OVERLAY
|
||||
#include <sys/cdefs.h>
|
||||
#else
|
||||
#include <bsd/sys/cdefs.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
@ -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>
|
||||
|
||||
|
@ -33,7 +33,11 @@
|
||||
#ifndef LIBBSD_STRING_H
|
||||
#define LIBBSD_STRING_H
|
||||
|
||||
#ifdef LIBBSD_OVERLAY
|
||||
#include <sys/cdefs.h>
|
||||
#else
|
||||
#include <bsd/sys/cdefs.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
@ -31,7 +31,12 @@
|
||||
|
||||
#ifndef LIBBSD_STRINGLIST_H
|
||||
#define LIBBSD_STRINGLIST_H
|
||||
|
||||
#ifdef LIBBSD_OVERLAY
|
||||
#include <sys/cdefs.h>
|
||||
#else
|
||||
#include <bsd/sys/cdefs.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
|
||||
/*
|
||||
|
@ -33,7 +33,11 @@
|
||||
#ifndef LIBBSD_SYS_QUEUE_H
|
||||
#define LIBBSD_SYS_QUEUE_H
|
||||
|
||||
#ifdef LIBBSD_OVERLAY
|
||||
#include <sys/cdefs.h>
|
||||
#else
|
||||
#include <bsd/sys/cdefs.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This file defines four types of data structures: singly-linked lists,
|
||||
|
@ -30,7 +30,11 @@
|
||||
#ifndef LIBBSD_SYS_TREE_H
|
||||
#define LIBBSD_SYS_TREE_H
|
||||
|
||||
#ifdef LIBBSD_OVERLAY
|
||||
#include <sys/cdefs.h>
|
||||
#else
|
||||
#include <bsd/sys/cdefs.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This file defines data structures for different types of trees:
|
||||
|
@ -41,7 +41,11 @@
|
||||
#ifndef LIBBSD_TIMECONV_H
|
||||
#define LIBBSD_TIMECONV_H
|
||||
|
||||
#ifdef LIBBSD_OVERLAY
|
||||
#include <sys/cdefs.h>
|
||||
#else
|
||||
#include <bsd/sys/cdefs.h>
|
||||
#endif
|
||||
#include <stdint.h>
|
||||
#include <time.h>
|
||||
|
||||
|
@ -72,7 +72,11 @@
|
||||
*/
|
||||
#define UNVIS_END 1 /* no more characters */
|
||||
|
||||
#ifdef LIBBSD_OVERLAY
|
||||
#include <sys/cdefs.h>
|
||||
#else
|
||||
#include <bsd/sys/cdefs.h>
|
||||
#endif
|
||||
|
||||
__BEGIN_DECLS
|
||||
char *vis(char *, int, int, int);
|
||||
|
@ -40,7 +40,11 @@
|
||||
#define LIBBSD_WCHAR_H
|
||||
|
||||
#include <stddef.h>
|
||||
#ifdef LIBBSD_OVERLAY
|
||||
#include <sys/cdefs.h>
|
||||
#else
|
||||
#include <bsd/sys/cdefs.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
|
||||
__BEGIN_DECLS
|
||||
|
Loading…
x
Reference in New Issue
Block a user