mirror of
https://github.com/aaru-dps/libaaruformat.git
synced 2025-12-16 11:14:39 +00:00
Fix compilation of tool in Linux.
This commit is contained in:
@@ -41,6 +41,17 @@ target_link_libraries(aaruformattool
|
||||
ICU::uc
|
||||
)
|
||||
|
||||
# On Linux, enable GNU/POSIX feature test macros so functions like strerror_r
|
||||
# and cfmakeraw are declared by system headers. We limit this to UNIX and not
|
||||
# Apple (macOS provides these declarations differently).
|
||||
if(UNIX AND NOT APPLE)
|
||||
target_compile_definitions(aaruformattool PRIVATE
|
||||
_GNU_SOURCE
|
||||
_DEFAULT_SOURCE
|
||||
_XOPEN_SOURCE=700)
|
||||
endif()
|
||||
|
||||
|
||||
# On macOS/iOS, explicitly link the C++ standard library for ICU dependencies
|
||||
if(APPLE)
|
||||
target_link_libraries(aaruformattool PRIVATE "-lc++")
|
||||
|
||||
@@ -72,7 +72,7 @@ int info(const char *path)
|
||||
aaruformat_context *ctx = NULL;
|
||||
char *strBuffer = NULL;
|
||||
UErrorCode u_error_code = U_ZERO_ERROR;
|
||||
uint i = 0;
|
||||
uint32_t i = 0;
|
||||
mediaTagEntry const *mediaTag = NULL;
|
||||
mediaTagEntry const *tmpMediaTag = NULL;
|
||||
|
||||
@@ -548,7 +548,7 @@ int info(const char *path)
|
||||
free(strBuffer);
|
||||
}
|
||||
|
||||
for(uint j = 0; j < ctx->dump_hardware_entries_with_data[i].entry.extents; j++)
|
||||
for(uint32_t j = 0; j < ctx->dump_hardware_entries_with_data[i].entry.extents; j++)
|
||||
{
|
||||
printf("\t\tExtent %d:\n", j);
|
||||
printf("\t\t\tStart: %llu\n", ctx->dump_hardware_entries_with_data[i].extents[j].start);
|
||||
|
||||
Reference in New Issue
Block a user