diff options
author | gnieboer <gnieboer@corpcomm.net> | 2019-06-02 10:14:45 -0400 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-06-06 09:30:03 -0700 |
commit | 1105b999237dfd54998700545f19a04262dee93c (patch) | |
tree | 408f9c1933d08a5a23d4d5e557da2c18b24fe265 /gr-blocks/lib/file_source_impl.cc | |
parent | ef8636fed8873696d3ef8b8eaad98a650901d597 (diff) |
gr-blocks: added fstat macros for msvc
Diffstat (limited to 'gr-blocks/lib/file_source_impl.cc')
-rw-r--r-- | gr-blocks/lib/file_source_impl.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gr-blocks/lib/file_source_impl.cc b/gr-blocks/lib/file_source_impl.cc index 18bbc73be3..e9ef6a2145 100644 --- a/gr-blocks/lib/file_source_impl.cc +++ b/gr-blocks/lib/file_source_impl.cc @@ -39,11 +39,14 @@ #define GR_FTELL _ftelli64 #define GR_FSTAT _fstat #define GR_FILENO _fileno +#define GR_STAT _stat +#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) #else #define GR_FSEEK fseeko #define GR_FTELL ftello #define GR_FSTAT fstat #define GR_FILENO fileno +#define GR_STAT stat #endif namespace gr { @@ -133,7 +136,7 @@ namespace gr { throw std::runtime_error("can't open file"); } - struct stat st; + struct GR_STAT st; if(GR_FSTAT(GR_FILENO(d_new_fp), &st)) { GR_LOG_ERROR(d_logger, boost::format("%s: %s") % filename % strerror(errno)); |