Compilation fails on MacOS 11.0
Open
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 3.7k
- Forks
- 336
- PR merge metrics
- No merged PRs in 30d
Description
src/lib/block_if.c:141:1: error: static declaration of 'preadv' follows non-static declaration
preadv(int fd, const struct iovec *iov, int iovcnt, off_t offset)
^
In file included from src/lib/block_if.c:50:
In file included from src/include/xhyve/block_if.h:38:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/uio.h:103:9: note: previous declaration is here
ssize_t preadv(int, const struct iovec *, int, off_t) __DARWIN_NOCANCEL(preadv) __API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0));
^
src/lib/block_if.c:152:1: error: static declaration of 'pwritev' follows non-static declaration
pwritev(int fd, const struct iovec *iov, int iovcnt, off_t offset)
^
In file included from src/lib/block_if.c:50:
In file included from src/include/xhyve/block_if.h:38:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/uio.h:104:9: note: previous declaration is here
ssize_t pwritev(int, const struct iovec *, int, off_t) __DARWIN_NOCANCEL(pwritev) __API_AVAILABLE(macos(11.0), ios(14.0), watchos(7.0), tvos(14.0));
^
2 errors generated.
make: *** [build/lib/block_if.o] Error 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure with the project build on macOS 11, then inspect src/lib/block_if.c around lines 141-152 and the sys/uio.h declarations shown in the error. Done means the project compiles successfully on macOS 11 without the preadv and pwritev declaration conflicts.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- build-system, operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100