Commit fd710c0d authored by Manuel Wudka-Robles's avatar Manuel Wudka-Robles
Browse files

Fix 32bit Linux build errors

parent 7d834b60
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@ project(kinetic_cpp_client_examples CXX C)

find_package (Threads)

set(CMAKE_CXX_FLAGS "-g --std=c++11 -Wall -Wextra -Werror -Wno-unused-parameter -DGTEST_USE_OWN_TR1_TUPLE=1")
set(CMAKE_CXX_FLAGS "-g --std=c++11 -Wall -Wextra -Werror -Wno-unused-parameter -DGTEST_USE_OWN_TR1_TUPLE=1 -D__STDC_FORMAT_MACROS")

set(GENERATED_SOURCES_PATH ${kinetic_cpp_client_SOURCE_DIR}/src/main/generated)

+0 −1
Original line number Diff line number Diff line
// This simple utility can periodically print various stats about a drive

#define __STDC_FORMAT_MACROS
#include <inttypes.h>
#include <stdio.h>

+2 −1
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@
#include <glog/logging.h>
#include <sys/fcntl.h>
#include <sys/mman.h>
#include <inttypes.h>

#include "protobufutil/message_stream.h"

@@ -124,7 +125,7 @@ int main(int argc, char* argv[]) {
            block_length = file_size - i + 1;
        }

        sprintf(key_buffer, "%s-%10llu", kinetic_key, i);
        sprintf(key_buffer, "%s-%10" PRId64, kinetic_key, (int64_t)i);
        remaining++;
        TestCallback* callback = new TestCallback(output_buffer + i, block_length, &remaining);
        std::string key(key_buffer);
+4 −2
Original line number Diff line number Diff line
// This writes the given file to a drive as a series of 1MB chunks and a metadata key
// This writes the given file to a drive as a series of 1MB chunks and a metadata
// key using the nonblocking API

#include <stdio.h>
#include <sys/fcntl.h>
#include <sys/mman.h>
#include <inttypes.h>

#include "protobufutil/message_stream.h"

@@ -84,7 +86,7 @@ int main(int argc, char* argv[]) {
            value_size = inputfile_stat.st_size - i + 1;
        }

        sprintf(key_buffer, "%s-%10llu", kinetic_key, i);
        sprintf(key_buffer, "%s-%10" PRId64, kinetic_key, (int64_t)i);

        std::string key(key_buffer);
        std::string value(inputfile_data + i, value_size);