Skip to content

Wrong patch recommended for compiling on OpenWrt #20

@ilario

Description

@ilario

Originally reported here javierbrk/vwifi_cli_package#1 (comment)

The patch recommended here https://github.com/Raizo62/vwifi/wiki/Install-on-OpenWRT-X86_64#download-the-code-of-vwifi

sed -i 's$1, NULL, 0,$1, 0, 0, 0, 0,$' ${HOME}/OpenWRT/vwifi/src/cmonwirelessdevice.cc

breaks the compilation causing this error:

build_dir/target-mipsel_24kc_musl/vwifi-1.0.0/src/cmonwirelessdevice.cc:210:94: error: too many initializers for 'msghdr'
  210 |         struct msghdr msg = { static_cast<void *>(&snl), sizeof(snl), &iov, 1, 0, 0, 0, 0, 0 };

This happens because the sed command increases the number of arguments from

struct msghdr msg = { static_cast<void *>(&snl), sizeof(snl), &iov, 1, NULL, 0, 0 };

to

struct msghdr msg = { static_cast<void *>(&snl), sizeof(snl), &iov, 1, 0, 0, 0, 0, 0 };

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions