Browse Source

[master] added missing include file for strncmp() and std:: qualifier for it.

apparently it didn't cause an error before as a side effect of including some
other header file.  due to a slight change to buffer.h we now need to do it
explicitly here (which is a good practice anyway).

committing it at my discretion.
JINMEI Tatuya 13 years ago
parent
commit
5b68f13805
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/lib/dns/labelsequence.cc

+ 3 - 1
src/lib/dns/labelsequence.cc

@@ -18,6 +18,8 @@
 
 #include <boost/functional/hash.hpp>
 
+#include <cstring>
+
 namespace isc {
 namespace dns {
 
@@ -52,7 +54,7 @@ LabelSequence::equals(const LabelSequence& other, bool case_sensitive) const {
         return (false);
     }
     if (case_sensitive) {
-        return (strncmp(data, other_data, len) == 0);
+        return (std::strncmp(data, other_data, len) == 0);
     }
 
     // As long as the data was originally validated as (part of) a name,