1313#include <aws/io/stream.h>
1414
1515#include <errno.h>
16+ #include <inttypes.h>
1617
1718AWS_STATIC_STRING_FROM_LITERAL (s_readonly_bytes_mode , "rb" );
1819
@@ -107,7 +108,10 @@ static int s_read_from_file_impl(
107108 /* seek to the right position and then read */
108109 if (aws_fseek (file_stream , (int64_t )offset , SEEK_SET )) {
109110 AWS_LOGF_ERROR (
110- AWS_LS_S3_GENERAL , "Failed to seek to position %llu in file %s" , offset , aws_string_c_str (file_path ));
111+ AWS_LS_S3_GENERAL ,
112+ "Failed to seek to position %" PRIu64 " in file %s" ,
113+ offset ,
114+ aws_string_c_str (file_path ));
111115 goto cleanup ;
112116 }
113117
@@ -122,7 +126,7 @@ static int s_read_from_file_impl(
122126 output_buf -> len += actually_read ;
123127 AWS_LOGF_TRACE (
124128 AWS_LS_S3_GENERAL ,
125- "Successfully read %zu bytes from file %s at position %llu " ,
129+ "Successfully read %zu bytes from file %s at position %" PRIu64 " " ,
126130 actually_read ,
127131 aws_string_c_str (file_path ),
128132 offset );
@@ -176,12 +180,7 @@ struct aws_future_bool *s_para_from_file_read(
176180
177181 struct read_task_impl * read_task = aws_mem_calloc (impl -> base .alloc , 1 , sizeof (struct read_task_impl ));
178182
179- AWS_LOGF_TRACE (
180- AWS_LS_S3_GENERAL ,
181- "id=%p: Read %zu bytes from offset %llu" ,
182- (void * )stream ,
183- length ,
184- (unsigned long long )offset );
183+ AWS_LOGF_TRACE (AWS_LS_S3_GENERAL , "id=%p: Read %zu bytes from offset %" PRIu64 "" , (void * )stream , length , offset );
185184
186185 /* Initialize for one read */
187186 read_task -> dest = dest ;
0 commit comments