From: Jens Axboe Date: Thu, 8 Jun 2017 16:07:55 +0000 (-0600) Subject: oslib/strndup: cleanup and remember to include for aux programs X-Git-Tag: fio-2.21~9 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=df27f9ac078236356fed6bbb828f744aa4a43240;hp=107ad00817e448d5bf8949ca7d3796b7f22d327c oslib/strndup: cleanup and remember to include for aux programs Signed-off-by: Jens Axboe --- diff --git a/Makefile b/Makefile index a412a43b..d7786d2b 100644 --- a/Makefile +++ b/Makefile @@ -212,7 +212,8 @@ 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 oslib/strcasestr.o + lib/strntol.o lib/gauss.o t/genzipf.o oslib/strcasestr.o \ + oslib/strndup.o T_ZIPF_PROGS = t/fio-genzipf T_AXMAP_OBJS = t/axmap.o @@ -225,7 +226,7 @@ T_LFSR_TEST_PROGS = t/lfsr-test T_GEN_RAND_OBJS = t/gen-rand.o T_GEN_RAND_OBJS += t/log.o t/debug.o lib/rand.o lib/pattern.o lib/strntol.o \ - oslib/strcasestr.o + oslib/strcasestr.o oslib/strndup.o T_GEN_RAND_PROGS = t/gen-rand ifeq ($(CONFIG_TARGET_OS), Linux) diff --git a/oslib/strndup.c b/oslib/strndup.c index 318ca933..7b0fcb51 100644 --- a/oslib/strndup.c +++ b/oslib/strndup.c @@ -1,5 +1,5 @@ #include -#include +#include "strndup.h" #ifndef CONFIG_HAVE_STRNDUP diff --git a/oslib/strndup.h b/oslib/strndup.h index 669364e4..2cb904da 100644 --- a/oslib/strndup.h +++ b/oslib/strndup.h @@ -1,8 +1,6 @@ -#ifdef CONFIG_HAVE_STRNDUP - #include -#else +#ifndef CONFIG_HAVE_STRNDUP char *strndup(const char *s, size_t n);