Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion lfs_fuse_bd.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,13 @@ int lfs_fuse_bd_create(struct lfs_config *cfg, const char *path) {
// get size in sectors
if (!cfg->block_count) {
uint64_t size;
int err = ioctl(fd, BLKGETSIZE64, &size);
int err = ioctl(fd,
#if defined(__FreeBSD__)
BLKGETSIZE,
#else
BLKGETSIZE64,
#endif
&size);
if (err) {
return -errno;
}
Expand Down