diff options
Diffstat (limited to 'nuttx/fs/fs_mmap.c')
-rw-r--r-- | nuttx/fs/fs_mmap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/nuttx/fs/fs_mmap.c b/nuttx/fs/fs_mmap.c index 309d48942..0fa0b56e1 100644 --- a/nuttx/fs/fs_mmap.c +++ b/nuttx/fs/fs_mmap.c @@ -146,10 +146,12 @@ FAR void *mmap(FAR void *start, size_t length, int prot, int flags, * only option supported * * Perform the ioctl to get the base address of the file in 'mapped' - * in memory. + * in memory. (casting to uintptr first eliminates complaints on some + * architectures where the sizeof long is different from the size of + * a pointer). */ - ret = ioctl(fd, FIOC_MMAP, (unsigned long)&addr); + ret = ioctl(fd, FIOC_MMAP, (unsigned long)((uintptr)&addr)); if (ret < 0) { fdbg("ioctl(FIOC_MMAP) failed: %d\n", errno); |