Skip to content

Commit

Permalink
fix 32-bit mmap issue on 64-bit kernels
Browse files Browse the repository at this point in the history
Running 32-bit userland on a 64-bit kernel resulted in the error:

    mpp_drm: mmap failed: Invalid argument

Both the pagesize_mask and the mmap call truncated the offset
value to 32 bit. This patch fixes both issues.

For details see rockchip-linux/kernel#17
  • Loading branch information
jakob-tsd authored and Kwiboo committed Oct 22, 2017
1 parent 34c6160 commit c08befd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions osal/allocator/allocator_drm.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
*/

#define MODULE_TAG "mpp_drm"
/* Enable 64-bit mmap also when compiling for 32 bit */
#define _FILE_OFFSET_BITS 64

#include <unistd.h>
#include <string.h>
Expand Down

0 comments on commit c08befd

Please sign in to comment.