diff --git a/src/ChecksumConverter.cc b/src/ChecksumConverter.cc index 53ffcc6..2684d7d 100644 --- a/src/ChecksumConverter.cc +++ b/src/ChecksumConverter.cc @@ -52,11 +52,15 @@ #if defined(vxWorks) || defined(__rtems__) // These systems have no strncasecmp at the moment // But avoid compiler errors in case strncasecmp exists in future versions -static int mystrncasecmp(const char *s1, const char *s2, size_t n) -{ - int r=0; - while (n && (r = toupper(*s1)-toupper(*s2)) == 0) { n--; s1++; s2++; }; - return r; +extern "C" { + + static int mystrncasecmp(const char *s1, const char *s2, size_t n) + { + int r=0; + while (n && (r = toupper(*s1)-toupper(*s2)) == 0) { n--; s1++; s2++; }; + return r; + } + } #define strncasecmp mystrncasecmp #endif