diff --git a/tensorpipe/common/system.cc b/tensorpipe/common/system.cc index 9e5751960..1a640c9f4 100644 --- a/tensorpipe/common/system.cc +++ b/tensorpipe/common/system.cc @@ -101,7 +101,10 @@ std::string getPathForLinuxNamespace(LinuxNamespace ns) { } return oss.str(); } - +#else +optional getBootIDInternal() { + return {}; +} #endif } // namespace diff --git a/tensorpipe/test/common/defs_test.cc b/tensorpipe/test/common/defs_test.cc index cd67e64f5..1b39c335b 100644 --- a/tensorpipe/test/common/defs_test.cc +++ b/tensorpipe/test/common/defs_test.cc @@ -14,7 +14,9 @@ TEST(Defs, Exception) { EXPECT_THROW(TP_THROW_EINVAL(), std::invalid_argument); EXPECT_THROW(TP_THROW_EINVAL() << "hola", std::invalid_argument); EXPECT_THROW(TP_THROW_EINVAL() << "adioshola", std::invalid_argument); +#if !defined(__FreeBSD__) EXPECT_THROW(TP_THROW_SYSTEM(ENODATA) << "adioshola", std::system_error); +#endif EXPECT_THROW(TP_THROW_SYSTEM(EBUSY), std::system_error); EXPECT_THROW(TP_THROW_SYSTEM(EBUSY) << "my message", std::system_error); } diff --git a/tensorpipe/test/peer_group.h b/tensorpipe/test/peer_group.h index 0bae41403..390396f9a 100644 --- a/tensorpipe/test/peer_group.h +++ b/tensorpipe/test/peer_group.h @@ -15,6 +15,7 @@ #include #include +#include #include #include