Skip to content

src/bsd.c:148:66: error: use of undeclared identifier 'IP_PKTINFO' #189

@yurivict

Description

@yurivict
cc -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing  -flto -DLIBUS_USE_OPENSSL -std=c11 -Isrc -O3 -c src/*.c src/eventing/*.c src/crypto/*.c
src/bsd.c:148:66: error: use of undeclared identifier 'IP_PKTINFO'
        if (cmsg->cmsg_level == IPPROTO_IP && cmsg->cmsg_type == IP_PKTINFO) {
                                                                 ^
src/bsd.c:150:27: error: incomplete definition of type 'struct in_pktinfo'
            memcpy(ip, &pi->ipi_addr, 4);
                        ~~^
src/bsd.c:149:20: note: forward declaration of 'struct in_pktinfo'
            struct in_pktinfo *pi = (struct in_pktinfo *) CMSG_DATA(cmsg);
                   ^
src/bsd.c:607:50: error: use of undeclared identifier 'IP_PKTINFO'
            if (setsockopt(listenFd, IPPROTO_IP, IP_PKTINFO, (void *) &enabled, sizeof(enabled)) != 0) {
                                                 ^
3 errors generated.

0.8.1 didn't have this problem.

Version: 0.8.3
FreeBSD 13.1 STABLE

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions