Fix: Warnings on qiradb trace file and ida build script shouldn't be hardcoded, use something similar to export IDA_SDK=~/idasdk68 && export IDA_DIR=~/ida-6.8

This commit is contained in:
Yahya Lmallas 2016-01-30 11:48:44 +01:00
parent 37574188dd
commit dc5775bb4d
2 changed files with 5 additions and 4 deletions

View File

@ -1,9 +1,9 @@
#!/bin/bash -e
SDKROOT=~/idasdk66
SDKROOT=$IDA_SDK
unamestr=$(uname)
if [[ "$unamestr" == 'Linux' ]]; then
IDAROOT=~/ida-6.8
IDAROOT=$IDA_DIR
OUTPUT="qira.plx"
OUTPUT64="qira.plx64"
ln -sf libs/linux_libwebsockets.a libwebsockets.a

View File

@ -1,5 +1,6 @@
#include <stdio.h>
#include <fcntl.h>
#include <inttypes.h>
#ifndef _WIN32
#include <sys/mman.h>
@ -91,7 +92,7 @@ bool Trace::remap_backing(uint64_t new_size) {
while (1) {
DWORD fs = GetFileSize(fd_, NULL);
if (fs < new_size) {
printf("WARNING: requested %llx bytes, but only %llx are in the file...waiting\n", new_size, fs);
printf("WARNING: requested %" PRIu64 " bytes, but only %llx are in the file...waiting\n", new_size, fs);
usleep(100 * 1000);
} else {
break;
@ -106,7 +107,7 @@ bool Trace::remap_backing(uint64_t new_size) {
while (1) {
off_t fs = lseek(fd_, 0, SEEK_END);
if (fs < new_size) {
printf("WARNING: requested %llx bytes, but only %llx are in the file...waiting\n", new_size, fs);
printf("WARNING: requested %" PRIu64 " bytes, but only %" PRIx64 " are in the file...waiting\n", new_size, fs);
usleep(100 * 1000);
} else {
break;