mirror of
https://gitlab.freedesktop.org/libbsd/libbsd.git
synced 2025-10-17 19:25:57 +02:00
Guard non-portable forwarded includes
These headers are not available on Windows. <bsd/sys/cdefs.h> ensures that __has_include() and __has_include_next() are defined. Signed-off-by: Guillem Jover <guillem@hadrons.org>
This commit is contained in:

committed by
Guillem Jover

parent
2ebe6d5a02
commit
c2d9d84088
@@ -33,10 +33,16 @@
|
||||
*/
|
||||
|
||||
#ifdef LIBBSD_OVERLAY
|
||||
#include <sys/cdefs.h>
|
||||
#if __has_include_next(<sys/time.h>)
|
||||
#include_next <sys/time.h>
|
||||
#endif
|
||||
#else
|
||||
#include <bsd/sys/cdefs.h>
|
||||
#if __has_include(<sys/time.h>)
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef LIBBSD_SYS_TIME_H
|
||||
#define LIBBSD_SYS_TIME_H
|
||||
|
Reference in New Issue
Block a user