Skip to content

Commit

Permalink
CMakeLists.txt: Explicitly define _FILE_OFFSET_BITS for glibc
Browse files Browse the repository at this point in the history
Fixes build on 32-bit glibc platforms.

See: #1 (comment)
  • Loading branch information
nmeum committed Oct 8, 2019
1 parent eebf5db commit b7ab657
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions vendor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++2a")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-attributes")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes")

# libfsmgr (required by fastboot) requires a 64-bit off_t for lseek. On
# 32-bit glibc platforms this is not the case by default.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_FILE_OFFSET_BITS=64")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FILE_OFFSET_BITS=64")

# Targets which should be installed by `make install`.
install(TARGETS adb fastboot "${ANDROID_MKE2FS_NAME}"
simg2img img2simg append2simg DESTINATION bin)

0 comments on commit b7ab657

Please sign in to comment.