Skip to content

Commit

Permalink
fix compile on ubuntu 20.04
Browse files Browse the repository at this point in the history
  • Loading branch information
gozfree committed Dec 26, 2020
1 parent 31fceca commit 61b0943
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gear-lib/libposix/test_libposix.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
#include <stdio.h>
#include <stdlib.h>
#ifdef OS_LINUX
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
#include <unistd.h>
#include <pthread.h>
#include <sys/types.h>
Expand All @@ -45,7 +47,7 @@ void foo()
if (0 > stat(file, &st)) {
printf("stat %s failed\n", file);
}
printf("%s size=%zu\n", file, (uint32_t)st.st_size);
printf("%s size=%" PRIu32 "\n", file, (uint32_t)st.st_size);
get_proc_name(proc, sizeof(proc));
printf("proc name = %s\n", proc);

Expand Down

0 comments on commit 61b0943

Please sign in to comment.