Files
haikuports/dev-cpp/eigen/patches/eigen-3.3.4.patchset
2017-09-18 09:20:32 +02:00

35 lines
1.4 KiB
Plaintext

From 48dd773e90210054e48cb53df40222bf8a8af12f Mon Sep 17 00:00:00 2001
From: Calvin Hill <calvin@hakobaito.co.uk>
Date: Mon, 1 May 2017 04:17:23 +0100
Subject: [PATCH] Eigen patch to run tests for Haiku
---
unsupported/Eigen/src/SparseExtra/MatrixMarketIterator.h | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/unsupported/Eigen/src/SparseExtra/MatrixMarketIterator.h b/unsupported/Eigen/src/SparseExtra/MatrixMarketIterator.h
index 02916ea..7bd2713 100644
--- a/unsupported/Eigen/src/SparseExtra/MatrixMarketIterator.h
+++ b/unsupported/Eigen/src/SparseExtra/MatrixMarketIterator.h
@@ -193,11 +193,13 @@ class MatrixMarketIterator
std::string curfile;
curfile = m_folder + "/" + m_curs_id->d_name;
// Discard if it is a folder
+#ifndef __HAIKU__
if (m_curs_id->d_type == DT_DIR) continue; //FIXME This may not be available on non BSD systems
-// struct stat st_buf;
-// stat (curfile.c_str(), &st_buf);
-// if (S_ISDIR(st_buf.st_mode)) continue;
-
+#else
+ struct stat st_buf;
+ stat (curfile.c_str(), &st_buf);
+ if (S_ISDIR(st_buf.st_mode)) continue;
+#endif
// Determine from the header if it is a matrix or a right hand side
bool isvector,iscomplex=false;
if(!getMarketHeader(curfile,m_sym,iscomplex,isvector)) continue;
--
2.12.2