From 1989bc33a772198abc7f85fd215a2430790485ec Mon Sep 17 00:00:00 2001 From: Tomoaki Teshima Date: Thu, 20 Jul 2017 08:27:02 +0900 Subject: [PATCH 1/2] fix build error on Visual Studio 2012 --- modules/dnn/src/torch/THDiskFile.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/dnn/src/torch/THDiskFile.cpp b/modules/dnn/src/torch/THDiskFile.cpp index 5f63ced48e..ce5a5d8a03 100644 --- a/modules/dnn/src/torch/THDiskFile.cpp +++ b/modules/dnn/src/torch/THDiskFile.cpp @@ -3,6 +3,9 @@ #include "THGeneral.h" #include "THDiskFile.h" #include "THFilePrivate.h" +#if defined(_MSC_VER) && 1600 <= _MSC_VER +#include +#endif namespace TH { From 08c94aa5c0bb19f102a486d9e7bf6320e931ec68 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Thu, 20 Jul 2017 14:01:21 +0300 Subject: [PATCH 2/2] build: reuse int32_t workaround from softfloat.hpp --- modules/dnn/src/precomp.hpp | 1 + modules/dnn/src/torch/THDiskFile.cpp | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/modules/dnn/src/precomp.hpp b/modules/dnn/src/precomp.hpp index d06e337c1a..9383a08e33 100644 --- a/modules/dnn/src/precomp.hpp +++ b/modules/dnn/src/precomp.hpp @@ -41,6 +41,7 @@ #include #include +#include // int32_t (MSVS 2010-2013) #include "cvconfig.h" #include #include diff --git a/modules/dnn/src/torch/THDiskFile.cpp b/modules/dnn/src/torch/THDiskFile.cpp index ce5a5d8a03..5f63ced48e 100644 --- a/modules/dnn/src/torch/THDiskFile.cpp +++ b/modules/dnn/src/torch/THDiskFile.cpp @@ -3,9 +3,6 @@ #include "THGeneral.h" #include "THDiskFile.h" #include "THFilePrivate.h" -#if defined(_MSC_VER) && 1600 <= _MSC_VER -#include -#endif namespace TH {