diff options
author | Sebastian Kuzminsky <seb@highlab.com> | 2016-05-14 15:44:13 +0200 |
---|---|---|
committer | Ruben Undheim <ruben.undheim@gmail.com> | 2019-10-18 23:27:34 +0200 |
commit | aaf35585cdbdc23215b3e88f5ed384ac923c1cb9 (patch) | |
tree | 22ed907f356bb26d3ed444178bafaf396e866b83 /kernel/yosys.cc | |
parent | c065995beac9e0abd83689db9a854d047f9e4899 (diff) |
Change yosys to look for the #define constant "__unix__" instead of "__linux__", to select code appropriate for Unix-like systems. This has been tested with Clang 3.5 and GCC 4.6, 4.8, and 4.9 on Linux, and Clang 3.5 and GCC 4.9 on kFreeBSD.
Gbp-Pq: Name kfreebsd-support.patch
Diffstat (limited to 'kernel/yosys.cc')
-rw-r--r-- | kernel/yosys.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/yosys.cc b/kernel/yosys.cc index 69a14176..791d40ec 100644 --- a/kernel/yosys.cc +++ b/kernel/yosys.cc @@ -89,7 +89,7 @@ std::vector<void*> memhasher_store; void memhasher_on() { -#if defined(__linux__) || defined(__FreeBSD__) +#if defined(__unix__) || defined(__FreeBSD__) memhasher_rng += time(NULL) << 16 ^ getpid(); #endif memhasher_store.resize(0x10000); @@ -737,7 +737,7 @@ struct TclPass : public Pass { } TclPass; #endif -#if defined(__linux__) || defined(__CYGWIN__) +#if defined(__unix__) std::string proc_self_dirname() { char path[PATH_MAX]; |