Fixed a few things that got damaged in Linux build while doing MSVC compatibility.

This commit is contained in:
Matthias Koefferlein 2018-09-09 22:43:22 +02:00
parent b97efcc75f
commit 84072aa23e
4 changed files with 5 additions and 4 deletions

View File

@ -121,6 +121,7 @@ msvc {
-Wno-strict-aliasing \
-Wno-deprecated-declarations \
-Wno-reserved-user-defined-literal \
-std=c++11 \
win32 {
QMAKE_LFLAGS += -Wl,--exclude-all-symbols

View File

@ -49,7 +49,7 @@
namespace db
{
DB_PLUGIN_PUBLIC std::string net_tracer_component_name;
extern std::string net_tracer_component_name;
}
namespace lay

View File

@ -552,7 +552,7 @@ InputZLibFile::InputZLibFile (const std::string &path)
}
mp_d->zs = gzdopen (fd, "rb");
#else
m_zs = gzopen (tl::string_to_system (path).c_str (), "rb");
mp_d->zs = gzopen (tl::string_to_system (path).c_str (), "rb");
#endif
if (mp_d->zs == NULL) {
throw FileOpenErrorException (m_source, errno);
@ -826,7 +826,7 @@ OutputZLibFile::OutputZLibFile (const std::string &path)
}
mp_d->zs = gzdopen (_fileno (file), "wb");
#else
m_zs = gzopen (tl::string_to_system (path).c_str (), "wb");
mp_d->zs = gzopen (tl::string_to_system (path).c_str (), "wb");
#endif
if (mp_d->zs == NULL) {
throw FileOpenErrorException (m_source, errno);

View File

@ -114,7 +114,7 @@ static int64_t ms_time ()
#else
timespec ts;
clock_gettime(CLOCK_REALTIME, ts);
clock_gettime (CLOCK_REALTIME, &ts);
return int64_t (ts.tv_sec) * 1000 + int64_t (0.5 + ts.tv_nsec / 1.0e6);
#endif