diff options
author | Nicholas Corgan <nick.corgan@ettus.com> | 2014-12-19 14:52:57 -0800 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2015-01-13 09:46:41 +0100 |
commit | 3f9ef46bc51acc5933721974e191d2a9659f6566 (patch) | |
tree | 9dc0b36ab3f9f70ce0a7d0629e1a56aa2b41aed1 /host/lib | |
parent | be5f9613311d944b8971570bff444c5af094f0f5 (diff) | |
download | uhd-3f9ef46bc51acc5933721974e191d2a9659f6566.tar.gz uhd-3f9ef46bc51acc5933721974e191d2a9659f6566.tar.bz2 uhd-3f9ef46bc51acc5933721974e191d2a9659f6566.zip |
Added support for MinGW cross-compile
* Added CMake toolchain file, compatible with different versions
* No dependency on MinGW runtime, all statically linked
* Misc coding tweaks to allow MinGW to compile
Diffstat (limited to 'host/lib')
-rw-r--r-- | host/lib/transport/nirio/nifpga_lvbitx.cpp | 2 | ||||
-rw-r--r-- | host/lib/utils/platform.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/host/lib/transport/nirio/nifpga_lvbitx.cpp b/host/lib/transport/nirio/nifpga_lvbitx.cpp index b87d87a8d..189037163 100644 --- a/host/lib/transport/nirio/nifpga_lvbitx.cpp +++ b/host/lib/transport/nirio/nifpga_lvbitx.cpp @@ -115,7 +115,7 @@ std::string nifpga_lvbitx::_get_fpga_images_dir(const std::string search_paths) // directories searched for a LVBITX image. // char* uhd_images_dir; -#ifdef UHD_PLATFORM_WIN32 +#if defined(UHD_PLATFORM_WIN32) && !defined(__MINGW32__) // Some versions of MinGW don't expose _dupenv_s size_t len; errno_t err = _dupenv_s(&uhd_images_dir, &len, "UHD_IMAGES_DIR"); if(not err and uhd_images_dir != NULL) search_path_vtr.push_back(std::string(uhd_images_dir)); diff --git a/host/lib/utils/platform.cpp b/host/lib/utils/platform.cpp index e2f92039e..a9cef663b 100644 --- a/host/lib/utils/platform.cpp +++ b/host/lib/utils/platform.cpp @@ -1,5 +1,5 @@ // -// Copyright 2010-2012 Ettus Research LLC +// Copyright 2010-2012,2014 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -19,7 +19,7 @@ #include <uhd/config.hpp> #include <boost/functional/hash.hpp> #ifdef UHD_PLATFORM_WIN32 -#include <Windows.h> +#include <windows.h> #else #include <unistd.h> #endif |