Turn <bsd/bsd.h> inert when using LIBBSD_OVERLAY

Also print a warning stating this fact.
This commit is contained in:
Guillem Jover 2015-12-14 00:44:47 +01:00
parent 2c77ad593c
commit cdf998a056

View File

@ -27,10 +27,12 @@
#ifndef LIBBSD_H #ifndef LIBBSD_H
#define LIBBSD_H #define LIBBSD_H
#ifdef LIBBSD_OVERLAY
#warning "This header is meant to be used w/o the libbsd overlay."
#else
/* /*
* Include all bsd compat headers. * Include all bsd compat headers.
*/ */
#include <bsd/sys/cdefs.h> #include <bsd/sys/cdefs.h>
#include <bsd/sys/queue.h> #include <bsd/sys/queue.h>
#include <bsd/sys/tree.h> #include <bsd/sys/tree.h>
@ -40,5 +42,6 @@
#include <bsd/err.h> #include <bsd/err.h>
#include <bsd/getopt.h> #include <bsd/getopt.h>
#include <bsd/md5.h> #include <bsd/md5.h>
#endif
#endif #endif