From df27f9ac078236356fed6bbb828f744aa4a43240 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 8 Jun 2017 10:07:55 -0600 Subject: [PATCH] oslib/strndup: cleanup and remember to include for aux programs Signed-off-by: Jens Axboe --- Makefile | 5 +++-- oslib/strndup.c | 2 +- oslib/strndup.h | 4 +--- 3 files changed, 5 insertions(+), 6 deletions(-) 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); -- 2.25.1