@cryptotaxi247 / netdata-1 / commits / 4d7f2bcd3

properly override strcmp()

Costa Tsaousis (ktsaou) committed Jan 22, 2017 at 06:09 UTC 4d7f2bcd3f0630ed7d2950c0b24af90d45fe5c68
1 file changed +5 -1
src/inlined.h
+5 -1
@@ -91,7 +91,11 @@ static inline unsigned long long str2ull(const char *s) {
91 }
92
93 #ifdef NETDATA_STRCMP_OVERRIDE
94 -static inline int strcmp(const char *a, const char *b) {
94 +#ifdef strcmp
95 +#undef strcmp
96 +#endif
97 +#define strcmp(a, b) strsame(a, b)
98 +static inline int strsame(const char *a, const char *b) {
99 if(unlikely(a == b)) return 0;
100 while(*a && *a == *b) { a++; b++; }
101 return *a - *b;