diff --git a/src/AbstractDiskWriter.cc b/src/AbstractDiskWriter.cc index a8a7f931..d7a6641a 100644 --- a/src/AbstractDiskWriter.cc +++ b/src/AbstractDiskWriter.cc @@ -134,7 +134,7 @@ void AbstractDiskWriter::openFile(int64_t totalLength) void AbstractDiskWriter::closeFile() { -#if defined HAVE_MMAP || defined __MINGW32__ +#if defined(HAVE_MMAP) || defined(__MINGW32__) if(mapaddr_) { int errNum = 0; #ifdef __MINGW32__ @@ -336,7 +336,7 @@ void AbstractDiskWriter::seek(int64_t offset) void AbstractDiskWriter::ensureMmapWrite(size_t len, int64_t offset) { -#if defined HAVE_MMAP || defined __MINGW32__ +#if defined(HAVE_MMAP) || defined(__MINGW32__) if(enableMmap_) { if(mapaddr_) { if(static_cast(len + offset) > maplen_) { diff --git a/src/AsyncNameResolver.cc b/src/AsyncNameResolver.cc index d9c73062..6dab3c11 100644 --- a/src/AsyncNameResolver.cc +++ b/src/AsyncNameResolver.cc @@ -76,7 +76,7 @@ AsyncNameResolver::AsyncNameResolver { // TODO evaluate return value ares_init(&channel_); -#if defined HAVE_ARES_SET_SERVERS && HAVE_ARES_ADDR_NODE +#if defined(HAVE_ARES_SET_SERVERS) && defined(HAVE_ARES_ADDR_NODE) if(servers) { // ares_set_servers has been added since c-ares 1.7.1 if(ares_set_servers(channel_, servers) != ARES_SUCCESS) { diff --git a/src/Context.cc b/src/Context.cc index 4919a378..d0b67d18 100644 --- a/src/Context.cc +++ b/src/Context.cc @@ -109,7 +109,7 @@ void showMetalinkFile } // namespace #endif // ENABLE_METALINK -#if defined ENABLE_BITTORRENT || defined ENABLE_METALINK +#if defined(ENABLE_BITTORRENT) || defined(ENABLE_METALINK) namespace { void showFiles (const std::vector& uris, const std::shared_ptr