aboutsummaryrefslogtreecommitdiff
path: root/security/md5deep
diff options
context:
space:
mode:
authorMANTANI Nobutaka <nobutaka@FreeBSD.org>2018-02-10 09:18:10 +0000
committerMANTANI Nobutaka <nobutaka@FreeBSD.org>2018-02-10 09:18:10 +0000
commit82fc859f11378af0d1ecf971a005a82c678d3104 (patch)
tree934a5fe9aeee48a512973bd871737bd556caf47a /security/md5deep
parent8f37f078a541af96bfb53a54051cfcc340c3cd58 (diff)
downloadports-82fc859f11378af0d1ecf971a005a82c678d3104.tar.gz
ports-82fc859f11378af0d1ecf971a005a82c678d3104.zip
Fix build with Clang 6.
Notes
Notes: svn path=/head/; revision=461369
Diffstat (limited to 'security/md5deep')
-rw-r--r--security/md5deep/files/patch-src_display.cpp33
-rw-r--r--security/md5deep/files/patch-src_files.cpp20
-rw-r--r--security/md5deep/files/patch-src_hash.cpp9
-rw-r--r--security/md5deep/files/patch-src_hashlist.cpp20
-rw-r--r--security/md5deep/files/patch-src_xml.h11
5 files changed, 93 insertions, 0 deletions
diff --git a/security/md5deep/files/patch-src_display.cpp b/security/md5deep/files/patch-src_display.cpp
new file mode 100644
index 000000000000..200b7dae58f7
--- /dev/null
+++ b/security/md5deep/files/patch-src_display.cpp
@@ -0,0 +1,33 @@
+--- src/display.cpp.orig 2018-02-10 07:49:09 UTC
++++ src/display.cpp
+@@ -311,7 +311,7 @@ void display::display_realtime_stats(con
+
+ ss << mb_read << "MB of " << fdht->stat_megs() << "MB done, ";
+ char msg[64];
+- snprintf(msg,sizeof(msg),"%02"PRIu64":%02"PRIu64":%02"PRIu64" left", hour, min, seconds);
++ snprintf(msg,sizeof(msg),"%02" PRIu64":%02" PRIu64":%02" PRIu64" left", hour, min, seconds);
+ ss << msg;
+ }
+ ss << "\r";
+@@ -424,14 +424,14 @@ void display::display_audit_results()
+
+ if (opt_verbose) {
+ if(opt_verbose >= MORE_VERBOSE){
+- status(" Input files examined: %"PRIu64, this->match.total);
+- status(" Known files expecting: %"PRIu64, this->match.expect);
++ status(" Input files examined: %" PRIu64, this->match.total);
++ status(" Known files expecting: %" PRIu64, this->match.expect);
+ }
+- status(" Files matched: %"PRIu64, this->match.exact);
+- status("Files partially matched: %"PRIu64, this->match.partial);
+- status(" Files moved: %"PRIu64, this->match.moved);
+- status(" New files found: %"PRIu64, this->match.unknown);
+- status(" Known files not found: %"PRIu64, this->match.unused);
++ status(" Files matched: %" PRIu64, this->match.exact);
++ status("Files partially matched: %" PRIu64, this->match.partial);
++ status(" Files moved: %" PRIu64, this->match.moved);
++ status(" New files found: %" PRIu64, this->match.unknown);
++ status(" Known files not found: %" PRIu64, this->match.unused);
+ }
+ }
+
diff --git a/security/md5deep/files/patch-src_files.cpp b/security/md5deep/files/patch-src_files.cpp
new file mode 100644
index 000000000000..417d03b4f772
--- /dev/null
+++ b/security/md5deep/files/patch-src_files.cpp
@@ -0,0 +1,20 @@
+--- src/files.cpp.orig 2018-02-10 07:48:06 UTC
++++ src/files.cpp
+@@ -509,7 +509,7 @@ int state::parse_encase_file(const char
+
+ // Users expect the line numbers to start at one, not zero.
+ if ((!ocb.opt_silent) || (mode_warn_only)) {
+- ocb.error("%s: No hash found in line %"PRIu32, fn, count + 1);
++ ocb.error("%s: No hash found in line %" PRIu32, fn, count + 1);
+ ocb.error("%s: %s", fn, strerror(errno));
+ return status_t::STATUS_USER_ERROR;
+ }
+@@ -542,7 +542,7 @@ int state::parse_encase_file(const char
+ }
+
+ if (expected_hashes != count){
+- ocb.error("%s: Expecting %"PRIu32" hashes, found %"PRIu32"\n",
++ ocb.error("%s: Expecting %" PRIu32" hashes, found %" PRIu32"\n",
+ fn, expected_hashes, count);
+ }
+ return status_t::status_ok;
diff --git a/security/md5deep/files/patch-src_hash.cpp b/security/md5deep/files/patch-src_hash.cpp
index 285059c3f423..e0f9eff808de 100644
--- a/security/md5deep/files/patch-src_hash.cpp
+++ b/security/md5deep/files/patch-src_hash.cpp
@@ -1,5 +1,14 @@
--- src/hash.cpp.orig 2014-01-29 18:40:39 UTC
+++ src/hash.cpp
+@@ -124,7 +124,7 @@ bool file_data_hasher_t::compute_hash(ui
+
+ // If an error occured, display a message and see if we need to quit.
+ if ((current_read_bytes<0) || (this->handle && ferror(this->handle))){
+- ocb->error_filename(this->file_name,"error at offset %"PRIu64": %s",
++ ocb->error_filename(this->file_name,"error at offset %" PRIu64": %s",
+ request_start, strerror(errno));
+
+ if (file_fatal_error()){
@@ -279,7 +279,7 @@ void file_data_hasher_t::hash()
MAP_FILE|
#endif
diff --git a/security/md5deep/files/patch-src_hashlist.cpp b/security/md5deep/files/patch-src_hashlist.cpp
new file mode 100644
index 000000000000..31c2bdb24a47
--- /dev/null
+++ b/security/md5deep/files/patch-src_hashlist.cpp
@@ -0,0 +1,20 @@
+--- src/hashlist.cpp.orig 2018-02-10 07:50:51 UTC
++++ src/hashlist.cpp
+@@ -342,7 +342,7 @@ hashlist::load_hash_file(display *ocb,co
+ file_data_t *t = new (std::nothrow) file_data_t();
+ if (NULL == t)
+ {
+- ocb->fatal_error("%s: Out of memory in line %"PRIu64,
++ ocb->fatal_error("%s: Out of memory in line %" PRIu64,
+ fn.c_str(), line_number);
+ }
+
+@@ -390,7 +390,7 @@ hashlist::load_hash_file(display *ocb,co
+ if ( !algorithm_t::valid_hash(hash_column[column_number],word))
+ {
+ if (ocb)
+- ocb->error("%s: Invalid %s hash in line %"PRIu64,
++ ocb->error("%s: Invalid %s hash in line %" PRIu64,
+ fn.c_str(),
+ hashes[hash_column[column_number]].name.c_str(),
+ line_number);
diff --git a/security/md5deep/files/patch-src_xml.h b/security/md5deep/files/patch-src_xml.h
new file mode 100644
index 000000000000..ab1a0c8c9096
--- /dev/null
+++ b/security/md5deep/files/patch-src_xml.h
@@ -0,0 +1,11 @@
+--- src/xml.h.orig 2018-02-10 07:20:10 UTC
++++ src/xml.h
+@@ -100,7 +100,7 @@ public:
+ void xmlout(const std::string &tag,const std::string &value){ xmlout(tag,value,"",true); }
+ void xmlout(const std::string &tag,const int value){ xmlprintf(tag,"","%d",value); }
+ void xmloutl(const std::string &tag,const long value){ xmlprintf(tag,"","%ld",value); }
+- void xmlout(const std::string &tag,const int64_t value){ xmlprintf(tag,"","%"PRId64,value); }
++ void xmlout(const std::string &tag,const int64_t value){ xmlprintf(tag,"","%" PRId64,value); }
+ void xmlout(const std::string &tag,const double value){ xmlprintf(tag,"","%f",value); }
+ void xmlout(const std::string &tag,const struct timeval &ts){
+ xmlprintf(tag,"","%d.%06d",(int)ts.tv_sec, (int)ts.tv_usec);