summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdebian/rules1
-rw-r--r--src/cstore/unionfs/cstore-unionfs.cpp10
2 files changed, 6 insertions, 5 deletions
diff --git a/debian/rules b/debian/rules
index 59eaab9..42dc3ce 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,6 +4,7 @@ export DH_OPTIONS
## uncomment to enable hardening
#export DEB_BUILD_HARDENING=1
+CXXFLAGS += -Wno-deprecated-declarations
cfg_opts := --prefix=/opt/vyatta
cfg_opts += --libdir=/usr/lib
diff --git a/src/cstore/unionfs/cstore-unionfs.cpp b/src/cstore/unionfs/cstore-unionfs.cpp
index 858a204..a990f03 100644
--- a/src/cstore/unionfs/cstore-unionfs.cpp
+++ b/src/cstore/unionfs/cstore-unionfs.cpp
@@ -179,7 +179,7 @@ vector<int> getActiveCommits()
int pid = atoi(dirp->d_name);
if (pid > 0) {
string command_path = string("/proc/") + dirp->d_name + "/cmdline";
- ifstream command_file(command_path.c_str());
+ std::ifstream command_file(command_path.c_str());
string command_line;
getline(command_file, command_line);
if (!command_line.empty()) {
@@ -1513,8 +1513,8 @@ UnionfsCstore::write_file(const char *file, const string& data, bool append)
b_fs::create_directories(ppath.path_cstr());
// write the file
- ofstream fout;
- fout.exceptions(ofstream::failbit | ofstream::badbit);
+ std::ofstream fout;
+ fout.exceptions(std::ofstream::failbit | std::ofstream::badbit);
ios_base::openmode mflags = ios_base::out;
mflags |= ((!append || !path_exists(file))
? ios_base::trunc : ios_base::app); // truncate or append
@@ -1543,7 +1543,7 @@ UnionfsCstore::read_whole_file(const FsPath& fpath, string& data)
}
stringbuf sbuf;
- ifstream fin(fpath.path_cstr());
+ std::ifstream fin(fpath.path_cstr());
fin >> &sbuf;
fin.close();
/* note: if file contains just a newline => (eof() && fail())
@@ -1605,7 +1605,7 @@ UnionfsCstore::find_line_in_file(const FsPath& file, const string& line)
{
bool ret = false;
try {
- ifstream fin(file.path_cstr());
+ std::ifstream fin(file.path_cstr());
while (!fin.eof() && !fin.bad() && !fin.fail()) {
string in;
getline(fin, in);