zmwangx/rust-ffmpeg

Fails to build on BSDs due to missing errno macros

jbeich opened this issue · 0 comments

NetBSD/src@b207990 and NetBSD/src@9d85c4a weren't adopted by DragonFly, FreeBSD, OpenBSD.

$ rustc -vV
rustc 1.52.1
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-unknown-freebsd
release: 1.52.1
LLVM version: 12.0.0

$ cargo build
[...]
error[E0432]: unresolved imports `libc::ENODATA`, `libc::ENOSR`, `libc::ENOSTR`, `libc::ETIME`
  --> src/util/error.rs:20:22
   |
20 |     ENFILE, ENOBUFS, ENODATA, ENODEV, ENOENT, ENOEXEC, ENOLCK, ENOLINK, ENOMEM, ENOMSG,
   |                      ^^^^^^^ no `ENODATA` in the root
21 |     ENOPROTOOPT, ENOSPC, ENOSR, ENOSTR, ENOSYS, ENOTCONN, ENOTDIR, ENOTEMPTY, ENOTRECOVERABLE,
   |                          ^^^^^  ^^^^^^ no `ENOSTR` in the root
   |                          |
   |                          no `ENOSR` in the root
22 |     ENOTSOCK, ENOTSUP, ENOTTY, ENXIO, EOPNOTSUPP, EOVERFLOW, EOWNERDEAD, EPERM, EPIPE, EPROTO,
23 |     EPROTONOSUPPORT, EPROTOTYPE, ERANGE, EROFS, ESPIPE, ESRCH, ETIME, ETIMEDOUT, ETXTBSY,
   |                                                                ^^^^^ no `ETIME` in the root
   |
help: a similar name exists in the module
   |
21 |     ENOPROTOOPT, ENOSPC, ENOSR, NOSTR, ENOSYS, ENOTCONN, ENOTDIR, ENOTEMPTY, ENOTRECOVERABLE,
   |                                 ^^^^^
help: a similar name exists in the module
   |
23 |     EPROTONOSUPPORT, EPROTOTYPE, ERANGE, EROFS, ESPIPE, ESRCH, VTIME, ETIMEDOUT, ETXTBSY,
   |                                                                ^^^^^