]> arthur.barton.de Git - netdata.git/commitdiff
properly override strcmp()
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Sun, 22 Jan 2017 04:09:32 +0000 (06:09 +0200)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Sun, 22 Jan 2017 04:09:32 +0000 (06:09 +0200)
src/inlined.h

index 5351ee27c72cdb273adbd5afc5b12eb0024255d3..e776f830e489e7577ac01b1c376779f8d436c17d 100644 (file)
@@ -91,7 +91,11 @@ static inline unsigned long long str2ull(const char *s) {
 }
 
 #ifdef NETDATA_STRCMP_OVERRIDE
-static inline int strcmp(const char *a, const char *b) {
+#ifdef strcmp
+#undef strcmp
+#endif
+#define strcmp(a, b) strsame(a, b)
+static inline int strsame(const char *a, const char *b) {
     if(unlikely(a == b)) return 0;
     while(*a && *a == *b) { a++; b++; }
     return *a - *b;