libbpf: Use pr_warn() when printing netlink errors
[linux-2.6-microblaze.git] / tools / lib / bpf / netlink.c
index ce3ec81..a261df9 100644 (file)
@@ -12,6 +12,7 @@
 
 #include "bpf.h"
 #include "libbpf.h"
+#include "libbpf_internal.h"
 #include "nlattr.h"
 
 #ifndef SOL_NETLINK
@@ -43,7 +44,7 @@ int libbpf_netlink_open(__u32 *nl_pid)
 
        if (setsockopt(sock, SOL_NETLINK, NETLINK_EXT_ACK,
                       &one, sizeof(one)) < 0) {
-               fprintf(stderr, "Netlink error reporting not supported\n");
+               pr_warn("Netlink error reporting not supported\n");
        }
 
        if (bind(sock, (struct sockaddr *)&sa, sizeof(sa)) < 0) {