diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2017-10-01 11:19:35 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2017-10-01 11:19:35 +0300 |
commit | 3842d176b0ef96f17be3c22d3ee7450816cea3a8 (patch) | |
tree | 745ea8f848e3035ea27debeff77fb0621f10e7b5 /debian/patches/dyson.patch | |
parent | eedc83800a867d34156b5c313510707a17016c6b (diff) | |
download | opencv-3842d176b0ef96f17be3c22d3ee7450816cea3a8.tar.gz |
opencv (2.4.9.1+dfsg1-2+dyson1)dyson/2.4.9.1+dfsg1-2+dyson2dyson/2.4.9.1+dfsg1-2+dyson1
Diffstat (limited to 'debian/patches/dyson.patch')
-rw-r--r-- | debian/patches/dyson.patch | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/debian/patches/dyson.patch b/debian/patches/dyson.patch new file mode 100644 index 0000000..0319a5e --- /dev/null +++ b/debian/patches/dyson.patch @@ -0,0 +1,74 @@ +Index: opencv-2.4.9.1+dfsg1/modules/ts/src/ts.cpp +=================================================================== +--- opencv-2.4.9.1+dfsg1.orig/modules/ts/src/ts.cpp ++++ opencv-2.4.9.1+dfsg1/modules/ts/src/ts.cpp +@@ -562,7 +562,7 @@ void TS::vprintf( int streams, const cha + for( int i = 0; i < MAX_IDX; i++ ) + if( (streams & (1 << i)) ) + { +- output_buf[i] += std::string(str); ++ output_buf[i] += ::std::string(str); + // in the new GTest-based framework we do not use + // any output files (except for the automatically generated xml report). + // if a test fails, all the buffers are printed, so we do not want to duplicate the information and +@@ -617,7 +617,7 @@ void smoothBorder(Mat& img, const Scalar + Scalar s; + uchar *p = NULL; + int n = 100/delta; +- int nR = std::min(n, (img.rows+1)/2), nC = std::min(n, (img.cols+1)/2); ++ int nR = ::std::min(n, (img.rows+1)/2), nC = ::std::min(n, (img.cols+1)/2); + + int r, c, i; + for(r=0; r<nR; r++) +Index: opencv-2.4.9.1+dfsg1/modules/contrib/src/inputoutput.cpp +=================================================================== +--- opencv-2.4.9.1+dfsg1.orig/modules/contrib/src/inputoutput.cpp ++++ opencv-2.4.9.1+dfsg1/modules/contrib/src/inputoutput.cpp +@@ -7,6 +7,7 @@ + #include <tchar.h> + #else + #include <dirent.h> ++ #include <sys/stat.h> + #endif + + namespace cv +@@ -72,14 +73,18 @@ namespace cv + (void)addPath; + DIR *dp; + struct dirent *dirp; ++ int dfd; ++ struct stat st; + if((dp = opendir(path.c_str())) == NULL) + { + return list; + } ++ dfd = dirfd(dp); + + while ((dirp = readdir(dp)) != NULL) + { +- if (dirp->d_type == DT_REG) ++ if ((0 == fstatat(dfd, dirp->d_name, &st, 0)) && ++ S_ISREG(st.st_mode)) + { + if (exten.compare("*") == 0) + list.push_back(static_cast<std::string>(dirp->d_name)); +@@ -162,14 +167,18 @@ namespace cv + (void)addPath; + DIR *dp; + struct dirent *dirp; ++ int dfd; ++ struct stat st; + if((dp = opendir(path_f.c_str())) == NULL) + { + return list; + } ++ dfd = dirfd(dp); + + while ((dirp = readdir(dp)) != NULL) + { +- if (dirp->d_type == DT_DIR && ++ if ((0 == fstatat(dfd, dirp->d_name, &st, 0)) && ++ S_ISDIR(st.st_mode) && + strcmp(dirp->d_name, ".") != 0 && + strcmp(dirp->d_name, "..") != 0 ) + { |