diff mbox series

ell: Inclusion of netlink.h in genl.h because of recent changes

Message ID CAL5LfdR_mL+LZ4APgLbWcptAvqnFvTJqgmE6Ryaj4gyquJYN3g@mail.gmail.com (mailing list archive)
State New
Headers show
Series ell: Inclusion of netlink.h in genl.h because of recent changes | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
prestwoj/iwd-ci-setupell success Prep - Setup ELL
prestwoj/iwd-ci-build success Build - Configure
prestwoj/iwd-ci-clang success clang PASS
prestwoj/iwd-ci-makecheckvalgrind success Make Check w/Valgrind
prestwoj/iwd-ci-makecheck success Make Check
prestwoj/iwd-ci-makedistcheck success Make Distcheck
prestwoj/iwd-ci-testrunner success test-runner PASS

Commit Message

Aditya Oct. 26, 2024, 11:01 a.m. UTC
I have found out that because recent changes, compilation of mptcpd
will failed with the following errors :

In file included from path_manager.c:21:
/home/user/works/openwrt/staging_dir/target-x86_64_glibc_custom/usr/include/ell/genl.h:
In function 'l_genl_attr_next':
/home/user/works/openwrt/staging_dir/target-x86_64_glibc_custom/usr/include/ell/genl.h:98:16:
error: implicit declaration of function 'l_netlink_attr_next'; did you
mean 'l_genl_attr_next'? [-Wimplicit-function-declaration]
   98 |         return l_netlink_attr_next((struct l_netlink_attr *) attr,
      |                ^~~~~~~~~~~~~~~~~~~
      |                l_genl_attr_next
/home/user/works/openwrt/staging_dir/target-x86_64_glibc_custom/usr/include/ell/genl.h:
In function 'l_genl_attr_recurse':
/home/user/works/openwrt/staging_dir/target-x86_64_glibc_custom/usr/include/ell/genl.h:105:16:
error: implicit declaration of function 'l_netlink_attr_recurse'; did
you mean 'l_genl_attr_recurse'? [-Wimplicit-function-declaration]
  105 |         return l_netlink_attr_recurse((struct l_netlink_attr *) attr,
      |                ^~~~~~~~~~~~~~~~~~~~~~
      |                l_genl_attr_recurse

This is compilation for glibc and by using gcc 14.2.0, the solution is
fairly simple :

Comments

Marcel Holtmann Oct. 28, 2024, 8:21 a.m. UTC | #1
Hi Aditya,

> I have found out that because recent changes, compilation of mptcpd
> will failed with the following errors :
> 
> In file included from path_manager.c:21:
> /home/user/works/openwrt/staging_dir/target-x86_64_glibc_custom/usr/include/ell/genl.h:
> In function 'l_genl_attr_next':
> /home/user/works/openwrt/staging_dir/target-x86_64_glibc_custom/usr/include/ell/genl.h:98:16:
> error: implicit declaration of function 'l_netlink_attr_next'; did you
> mean 'l_genl_attr_next'? [-Wimplicit-function-declaration]
>   98 |         return l_netlink_attr_next((struct l_netlink_attr *) attr,
>      |                ^~~~~~~~~~~~~~~~~~~
>      |                l_genl_attr_next
> /home/user/works/openwrt/staging_dir/target-x86_64_glibc_custom/usr/include/ell/genl.h:
> In function 'l_genl_attr_recurse':
> /home/user/works/openwrt/staging_dir/target-x86_64_glibc_custom/usr/include/ell/genl.h:105:16:
> error: implicit declaration of function 'l_netlink_attr_recurse'; did
> you mean 'l_genl_attr_recurse'? [-Wimplicit-function-declaration]
>  105 |         return l_netlink_attr_recurse((struct l_netlink_attr *) attr,
>      |                ^~~~~~~~~~~~~~~~~~~~~~
>      |                l_genl_attr_recurse
> 
> This is compilation for glibc and by using gcc 14.2.0, the solution is
> fairly simple :
> 
> diff -Naur a/ell/genl.h b/ell/genl.h
> --- a/ell/genl.h
> +++ b/ell/genl.h
> @@ -11,6 +11,7 @@
> #include <stdbool.h>
> #include <stddef.h>
> #include <stdint.h>
> +#include "netlink.h"
> 
> #ifdef __cplusplus
> extern "C” {
> 

your fix is wrong. This is not a bug in ELL, this is a bug in mptcpd.

https://github.com/multipath-tcp/mptcpd/pull/309

Users of ELL must include <ell/ell.h> since all the other headers are
on purpose not self-contained.

Regards

Marcel
diff mbox series

Patch

diff -Naur a/ell/genl.h b/ell/genl.h
--- a/ell/genl.h
+++ b/ell/genl.h
@@ -11,6 +11,7 @@ 
 #include <stdbool.h>
 #include <stddef.h>
 #include <stdint.h>
+#include "netlink.h"

 #ifdef __cplusplus
 extern "C" {