oslib: make str* compat functions more uniform
[fio.git] / oslib / strndup.c
index 40e92f820d12b1279e35a94739dde78f16746fa6..657904ab64d8044f71cce87b716743a21036186a 100644 (file)
@@ -1,9 +1,9 @@
-#include <stdlib.h>
+#ifndef CONFIG_HAVE_STRNDUP
 
+#include <stdlib.h>
+#include <string.h>
 #include "strndup.h"
 
-#ifndef CONFIG_HAVE_STRNDUP
-
 char *strndup(const char *s, size_t n)
 {
        char *str = malloc(n + 1);