mirror of
https://gitlab.freedesktop.org/libbsd/libbsd.git
synced 2025-10-15 15:16:53 +02:00
Add support for transparent compilation
This means that software being ported should not need to be modified in the usual case, as the libbsd headers will take over the standard namespace and fill the missing gaps, and include the system headers. To use this the new libbsd-transparent.pc file can be used through pkg-config, which should end up doing the right thing.
This commit is contained in:
@@ -32,10 +32,19 @@
|
||||
#include <sys/cdefs.h>
|
||||
#include <sys/stat.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef LIBBSD_TRANSPARENT
|
||||
#include_next <stdlib.h>
|
||||
#else
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
/* For compatibility with NetBSD, which defines humanize_number here. */
|
||||
#ifdef LIBBSD_TRANSPARENT
|
||||
#include <libutil.h>
|
||||
#else
|
||||
#include <bsd/libutil.h>
|
||||
#endif
|
||||
|
||||
/* FIXME: Temporary inclusions to avoid API breakage, will be removed soon. */
|
||||
#include <bsd/stdio.h>
|
||||
|
Reference in New Issue
Block a user