t/genzipf: fix for strcasestr missing
authorJens Axboe <axboe@fb.com>
Tue, 29 Dec 2015 00:39:22 +0000 (17:39 -0700)
committerJens Axboe <axboe@fb.com>
Tue, 29 Dec 2015 00:39:22 +0000 (17:39 -0700)
Signed-off-by: Jens Axboe <axboe@fb.com>
Makefile
oslib/strcasestr.c

index 2ff88a1d4b4549837ea0ecd4ac8504636301874c..510e2570bd84dad22368be085d69df30ee16a440 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -200,7 +200,7 @@ T_IEEE_PROGS = t/ieee754
 
 T_ZIPF_OBS = t/genzipf.o
 T_ZIPF_OBJS += t/log.o lib/ieee754.o lib/rand.o lib/pattern.o lib/zipf.o \
-               lib/strntol.o lib/gauss.o t/genzipf.o
+               lib/strntol.o lib/gauss.o t/genzipf.o oslib/strcasestr.o
 T_ZIPF_PROGS = t/fio-genzipf
 
 T_AXMAP_OBJS = t/axmap.o
index 92cf24c6778d7d4934598be426cb60b75f6dda96..262660911cdfbb96c7cc43135f0d7d1fcf290ff7 100644 (file)
@@ -1,6 +1,8 @@
 #include <ctype.h>
 #include <stddef.h>
 
+#ifndef CONFIG_STRCASESTR
+
 char *strcasestr(const char *s1, const char *s2)
 {
        const char *s = s1;
@@ -23,3 +25,5 @@ char *strcasestr(const char *s1, const char *s2)
 
        return *p ? NULL : (char *) s1;
 }
+
+#endif