eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

commit 901305dcdd0d6b9129a63d542a36c4f0e580ce2e
parent b4a449553700d157cdfa70ade89d320492d78040
Author: Sergei Trofimovich <slyich@gmail.com>
Date:   Tue, 19 Nov 2024 22:28:46 +0000

wired: fix -std=c23 build failure

gcc-15 switched to -std=c23 by default:

    https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=55e3bd376b2214e200fa76d12b67ff259b06c212

As a result `iwd` fails the build as:

    wired/ethdev.c: In function 'pae_open':
    wired/ethdev.c:340:55:
      error: passing argument 4 of 'l_io_set_read_handler'
        from incompatible pointer type [-Wincompatible-pointer-types]
      340 |         l_io_set_read_handler(pae_io, pae_read, NULL, pae_destroy);
          |                                                       ^~~~~~~~~~~
          |                                                       |
          |                                                       void (*)(void)
    In file included from ...-ell-0.70-dev/include/ell/ell.h:19,
                     from wired/ethdev.c:38:
    ...-ell-0.70-dev/include/ell/io.h:33:68:
      note: expected 'l_io_destroy_cb_t' {aka 'void (*)(void *)'}
        but argument is of type 'void (*)(void)'
       33 |                                 void *user_data, l_io_destroy_cb_t destroy);
          |                                                  ~~~~~~~~~~~~~~~~~~^~~~~~~

C23 changed the meaning of `void (*)()` from partially defined prototype
to `void (*)(void)`.

Diffstat:
Mwired/ethdev.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/wired/ethdev.c b/wired/ethdev.c @@ -312,8 +312,9 @@ static bool pae_read(struct l_io *io, void *user_data) return true; } -static void pae_destroy() +static void pae_destroy(void * user_data) { + (void)user_data; pae_io = NULL; }