We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The new driver is making use of a cpp frontend in xcodeml-tools and this does not compile under macOS because it uses posix_fallocate function.
posix_fallocate
xcodeml-tools/F-FrontEnd-cpp/src/io_cache.cpp:145:17: error: 'posix_fallocate' was not declared in this scope if (posix_fallocate(fd, 0, size) != 0)
quick workaround is to add a simple implementation to be able to compile
static int posix_fallocate(int fd, off_t offset, off_t len) { off_t c_test; int ret; if (!__builtin_saddll_overflow(offset, len, &c_test)) { fstore_t store = {F_ALLOCATECONTIG, F_PEOFPOSMODE, 0, offset + len}; // Try to get a continuous chunk of disk space fcntl(fd, F_PREALLOCATE, &store); if (ret < 0) { // OK, perhaps we are too fragmented, allocate non-continuous store.fst_flags = F_ALLOCATEALL; ret = fcntl(fd, F_PREALLOCATE, &store); if (ret < 0) { return ret; } } ret = ftruncate(fd, offset + len); } else { // offset+len would overflow. ret = -1; } return ret; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The new driver is making use of a cpp frontend in xcodeml-tools and this does not compile under macOS because it uses
posix_fallocate
function.quick workaround is to add a simple implementation to be able to compile
The text was updated successfully, but these errors were encountered: