Maximilien Siavelis
2019-05-06 97ca2423a4686f7f9e85a33a88556dae4aad1bab
Merge pull request #21 from matteovaralta91/master

Porting to Centos 7
6个文件已修改
12 ■■■■ 已修改文件
CMakeLists.txt 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
example/CMakeLists.txt 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
example/example.cpp 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/library/ini/SimpleIni.h 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/library/os/os-linux.c 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/tools/license-generator/license-generator.cpp 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
CMakeLists.txt
@@ -98,6 +98,7 @@
        list(APPEND EXTERNAL_LIBS ${DBUS_LIBRARIES})
    endif(USE_DBUS_IDENTIFIER)    
    list(APPEND EXTERNAL_LIBS dl)
    list(APPEND EXTERNAL_LIBS "-Wl,-Bdynamic")
endif(NOT MSVC)
configure_file (
example/CMakeLists.txt
@@ -1,4 +1,5 @@
cmake_minimum_required(VERSION 3.0)
#cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 2.8.11)
link_directories (   "${CMAKE_CURRENT_SOURCE_DIR}/../install/lib" )
include_directories( "${CMAKE_CURRENT_SOURCE_DIR}/../install/include" )
example/example.cpp
@@ -31,7 +31,7 @@
    licenseLocation.environmentVariableName = "";
    EVENT_TYPE result = acquire_license("example", licenseLocation, &licenseInfo);
    PcSignature signature;
    FUNCTION_RETURN generate_ok = generate_user_pc_signature(signature, ETHERNET);
    FUNCTION_RETURN generate_ok = generate_user_pc_signature(signature, DEFAULT);
    if (result == LICENSE_OK && licenseInfo.linked_to_pc) {
        CSimpleIniA ini;
src/library/ini/SimpleIni.h
@@ -2488,6 +2488,9 @@
        bNeedNewLine = true;
    }
    // Append new empty line
    a_oOutput.Write(SI_NEWLINE_A);
    return SI_OK;
}
src/library/os/os-linux.c
@@ -95,6 +95,7 @@
    currentDrive = 0;
    while (NULL != (ent = getmntent(aFile))) {
        if ((strncmp(ent->mnt_type, "ext", 3) == 0
                || strncmp(ent->mnt_type, "xfs", 3) == 0
                || strncmp(ent->mnt_type, "vfat", 4) == 0
                || strncmp(ent->mnt_type, "ntfs", 4) == 0)
                && ent->mnt_fsname != NULL
src/tools/license-generator/license-generator.cpp
@@ -178,7 +178,7 @@
    if (vm.count("output")) {
        const std::string fname = vm["output"].as<string>();
        fstream ofstream(fname, std::ios::out | std::ios::trunc);
        fstream ofstream(fname, std::ios::out | std::ios::app);
        if (!ofstream.is_open()) {
            cerr << "can't open file [" << fname << "] for output." << endl
                    << " error: " << strerror( errno);