forked from github/verilator
Fix MacOS portability, bug1230.
This commit is contained in:
parent
5bc2f87d3e
commit
db8e8392fa
2
Changes
2
Changes
@ -37,6 +37,8 @@ The contributors that suggested a given feature are shown in []. Thanks!
|
||||
|
||||
**** Fix float-conversion warning, bug1229. [Robert Henry]
|
||||
|
||||
**** Fix MacOS portability, bug1230. [Jeff Bush]
|
||||
|
||||
|
||||
* Verilator 3.912 2017-09-23
|
||||
|
||||
|
@ -222,6 +222,9 @@ _MY_CXX_CHECK_OPT(CFG_CXXFLAGS_NO_UNUSED,-Wno-shadow)
|
||||
AC_SUBST(CFG_CXXFLAGS_NO_UNUSED)
|
||||
|
||||
# Checks for library functions.
|
||||
AC_CHECK_MEMBER([struct stat.st_mtim.tv_nsec],
|
||||
[AC_DEFINE([HAVE_STAT_NSEC],[1],[Define if struct stat has st_mtim.tv_nsec.])],
|
||||
[], [#include <sys/stat.h>])
|
||||
|
||||
# Checks for system services
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
# define INFILTER_PIPE // Allow pipe filtering. Needs fork()
|
||||
#endif
|
||||
|
||||
#ifdef st_mtime // Linux 2.6
|
||||
#ifdef HAVE_STAT_NSEC // i.e. Linux 2.6, from configure
|
||||
# define VL_STAT_CTIME_NSEC(stat) ((stat).st_ctim.tv_nsec) // Nanoseconds
|
||||
# define VL_STAT_MTIME_NSEC(stat) ((stat).st_mtim.tv_nsec) // Nanoseconds
|
||||
#else
|
||||
|
@ -68,8 +68,13 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
//**********************************************************************
|
||||
//**** Configure-discovered library options
|
||||
|
||||
// Define if struct stat has st_mtim.tv_nsec (from configure)
|
||||
#undef HAVE_STAT_NSEC
|
||||
|
||||
//**********************************************************************
|
||||
//**** OS and compiler specifics
|
||||
|
||||
#include "verilatedos.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user