summaryrefslogtreecommitdiff
path: root/src/genl-ctrl-list.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-03-01 22:00:14 +0100
committerThomas Haller <thaller@redhat.com>2017-03-02 01:33:25 +0100
commit45cbfb9d11c23d5f64a795fb05205ced48db1c7c (patch)
treecec9fcb3513f60bd017d1c3eda94b593438fe8fc /src/genl-ctrl-list.c
parent3b2071e970995a9a22d46457e60a762161b46231 (diff)
downloadlibnl-45cbfb9d11c23d5f64a795fb05205ced48db1c7c.tar.gz
include: don't include kernel headers in public libnl3 headers
It would be desirable not to include kernel headers in our public libnl3 headers. As a test, remove all those includes, and fix compilation by explicitly including the kernel headers where needed. In some cases, that requires forward declaration for kernel structures, as we use them as part of our own headers. Realistically, we cannot drop those includes as it probalby breaks compilation for users that expect to get a certain kernel header when including a libnl3 header. So, this will not be done and the includes will be restored in the next commit. Do this step to show how it would be and to verify that we could build with such a change. The reason not to do this is backward compatibility (at compile-time).
Diffstat (limited to 'src/genl-ctrl-list.c')
-rw-r--r--src/genl-ctrl-list.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/genl-ctrl-list.c b/src/genl-ctrl-list.c
index 078c30c7..e6d09c35 100644
--- a/src/genl-ctrl-list.c
+++ b/src/genl-ctrl-list.c
@@ -11,6 +11,8 @@
#include <netlink/cli/utils.h>
+#include <linux/genetlink.h>
+
static struct nl_cache *alloc_genl_family_cache(struct nl_sock *sk)
{
return nl_cli_alloc_cache(sk, "generic netlink family",