diff options
-rw-r--r-- | devmem2.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -48,7 +48,8 @@ #include <termios.h> #include <sys/types.h> #include <sys/mman.h> -#include <stdint.h> +#include <stdint.h> +#include <inttypes.h> #define FATAL do { fprintf(stderr, "Error at line %d, file %s (%d) [%s]\n", \ __LINE__, __FILE__, errno, strerror(errno)); exit(1); } while(0) @@ -106,7 +107,7 @@ int main(int argc, char **argv) { fprintf(stderr, "Illegal data type '%c'.\n", access_type); exit(2); } - printf("Value at address 0x%X (%p): 0x%X\n", target, virt_addr, read_result); + printf("Value at address 0x%X (%p): 0x%" PRIX64 "\n", target, virt_addr, read_result); fflush(stdout); if(argc > 3) { |