diff --git a/src/lib/dns/master_lexer_inputsource.cc b/src/lib/dns/master_lexer_inputsource.cc index f38d6c3a53..6c43dc1c56 100644 --- a/src/lib/dns/master_lexer_inputsource.cc +++ b/src/lib/dns/master_lexer_inputsource.cc @@ -46,7 +46,7 @@ InputSource::InputSource(const char* filename) : name_(filename), input_(file_stream_) { - file_stream_.open(filename, std::fstream::in); + file_stream_.open(filename); if (file_stream_.fail()) { isc_throw(OpenError, "Error opening the input source file: " << filename); diff --git a/src/lib/dns/master_lexer_inputsource.h b/src/lib/dns/master_lexer_inputsource.h index b7eee5f11c..136e8097a8 100644 --- a/src/lib/dns/master_lexer_inputsource.h +++ b/src/lib/dns/master_lexer_inputsource.h @@ -135,7 +135,7 @@ private: size_t buffer_pos_; const std::string name_; - std::fstream file_stream_; + std::ifstream file_stream_; std::istream& input_; };