Skip to content

Compile errors with clang on FreeBSD #5

Description

@aseprano

There are several compile issues using clang on my freebsd machine:

  1. missing <array> inclusion:

In file included from process.cpp:9:
In file included from ./includes.h:39:
./../include/pipe.h:25:24: error: implicit instantiation of undefined template 'std::__1::array<int, 2>'
std::array<int, 2> _fds;

so I added it to src/includes.h

  1. watchers/write.cpp:35 calls ev_io_init() which generates the following: use of overloaded operator '|' is ambiguous (with operand types '<anonymous enum at /usr/local/include/ev.h:211:1>' and
    '<anonymous enum at /usr/local/include/ev.h:211:1>')
    This ambiguity candidate are the enum containing the EV_* values in ev.h and the uint128_t class, so I forced an int cast in src/watchers/write.cpp:
ev_io_init(&_watcher, onActive, fd, (int)EV_WRITE);
  1. same as 2 but applies to watchers/read.cpp

  2. the file include/tcp/socket.h requires <sys/uio.h> for calling ::writev(_fd, iov, iovcnt) at line 286

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