diff --git a/library/DFProcess-linux-SHM.cpp b/library/DFProcess-linux-SHM.cpp index 2f5889908..b23132066 100644 --- a/library/DFProcess-linux-SHM.cpp +++ b/library/DFProcess-linux-SHM.cpp @@ -268,7 +268,7 @@ void SHMProcess::getMemRanges( vector & ranges ) char buffer[1024]; char permissions[5]; // r/-, w/-, x/-, p/s, 0 - sprintf(buffer, "/proc/%lu/maps", d->process_ID); + sprintf(buffer, "/proc/%lu/maps", (long unsigned)d->process_ID); FILE *mapFile = ::fopen(buffer, "r"); uint64_t offset, device1, device2, node; @@ -276,7 +276,7 @@ void SHMProcess::getMemRanges( vector & ranges ) { t_memrange temp; temp.name[0] = 0; - sscanf(buffer, "%llx-%llx %s %llx %2llu:%2llu %llu %s", + sscanf(buffer, "%zx-%zx %s %zx %2zu:%2zu %zu %s", &temp.start, &temp.end, (char*)&permissions, diff --git a/library/DFProcess-linux-base.cpp b/library/DFProcess-linux-base.cpp index f704d384e..b3a774e2e 100644 --- a/library/DFProcess-linux-base.cpp +++ b/library/DFProcess-linux-base.cpp @@ -85,7 +85,7 @@ void LinuxProcessBase::getMemRanges( vector & ranges ) char buffer[1024]; char permissions[5]; // r/-, w/-, x/-, p/s, 0 - sprintf(buffer, "/proc/%lu/maps", my_pid); + sprintf(buffer, "/proc/%lu/maps", (long unsigned)my_pid); FILE *mapFile = ::fopen(buffer, "r"); uint64_t offset, device1, device2, node; @@ -93,7 +93,7 @@ void LinuxProcessBase::getMemRanges( vector & ranges ) { t_memrange temp; temp.name[0] = 0; - sscanf(buffer, "%llx-%llx %s %llx %2llu:%2llu %llu %s", + sscanf(buffer, "%zx-%zx %s %zx %2zu:%2zu %zu %s", &temp.start, &temp.end, (char*)&permissions,