diff options
author | Thomas Haller <thaller@redhat.com> | 2023-08-02 14:18:09 (GMT) |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2023-08-02 20:20:12 (GMT) |
commit | 2b3cd741d9944f799467b5a59fc9f3a94444a479 (patch) | |
tree | 5448349e48180b96c121bdeec6824ca6d1efd8e3 /include | |
parent | 8952ce6f6fd925f4c9421d31cbb532ebf46e8a72 (diff) | |
download | libnl-2b3cd741d9944f799467b5a59fc9f3a94444a479.zip libnl-2b3cd741d9944f799467b5a59fc9f3a94444a479.tar.gz libnl-2b3cd741d9944f799467b5a59fc9f3a94444a479.tar.bz2 |
include: add "nl-default.h" header
In an autotools project, <config.h> should be included as very first thing
in almost all cases. We also want include other stuff, in particular
"include/base", which contains our own extensions on top of plain C (it
is thus applicable to all our C modules).
Add a "nl-default.h", which can be included as first and prepares a base
for each C source.
Additionally, since header files are never compiled directly (only indirectly
by being included), they can rely that "nl-default.h" is always available.
Diffstat (limited to 'include')
-rw-r--r-- | include/netlink-private/netlink.h | 4 | ||||
-rw-r--r-- | include/nl-default.h | 10 |
2 files changed, 12 insertions, 2 deletions
diff --git a/include/netlink-private/netlink.h b/include/netlink-private/netlink.h index 5d6f7e5..cc67841 100644 --- a/include/netlink-private/netlink.h +++ b/include/netlink-private/netlink.h @@ -6,6 +6,8 @@ #ifndef NETLINK_LOCAL_H_ #define NETLINK_LOCAL_H_ +#include "nl-default.h" + #include <stdio.h> #include <errno.h> #include <stdlib.h> @@ -26,8 +28,6 @@ #include <arpa/inet.h> #include <netdb.h> -#include <config.h> - #ifndef SOL_NETLINK #define SOL_NETLINK 270 #endif diff --git a/include/nl-default.h b/include/nl-default.h new file mode 100644 index 0000000..83dbcb4 --- /dev/null +++ b/include/nl-default.h @@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: LGPL-2.1-only */ + +#ifndef __NL_DEFAULT_H__ +#define __NL_DEFAULT_H__ + +#include "config.h" + +#include "base/nl-base-utils.h" + +#endif /* __NL_DEFAULT_H__ */ |