diff options
Diffstat (limited to 'tools/lib/subcmd')
-rw-r--r-- | tools/lib/subcmd/help.c | 1 | ||||
-rw-r--r-- | tools/lib/subcmd/parse-options.c | 1 | ||||
-rw-r--r-- | tools/lib/subcmd/subcmd-util.h | 9 |
3 files changed, 2 insertions, 9 deletions
diff --git a/tools/lib/subcmd/help.c b/tools/lib/subcmd/help.c index e228c3cb3716..ba970a73d053 100644 --- a/tools/lib/subcmd/help.c +++ b/tools/lib/subcmd/help.c @@ -1,6 +1,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <linux/string.h> #include <termios.h> #include <sys/ioctl.h> #include <sys/types.h> diff --git a/tools/lib/subcmd/parse-options.c b/tools/lib/subcmd/parse-options.c index 6bc24025d054..359bfa77f39c 100644 --- a/tools/lib/subcmd/parse-options.c +++ b/tools/lib/subcmd/parse-options.c @@ -1,4 +1,5 @@ #include <linux/compiler.h> +#include <linux/string.h> #include <linux/types.h> #include <stdio.h> #include <stdlib.h> diff --git a/tools/lib/subcmd/subcmd-util.h b/tools/lib/subcmd/subcmd-util.h index fc2e45d8aaf1..8fa5f036eff0 100644 --- a/tools/lib/subcmd/subcmd-util.h +++ b/tools/lib/subcmd/subcmd-util.h @@ -79,13 +79,4 @@ static inline void astrcat(char **out, const char *add) free(tmp); } -static inline int prefixcmp(const char *str, const char *prefix) -{ - for (; ; str++, prefix++) - if (!*prefix) - return 0; - else if (*str != *prefix) - return (unsigned char)*prefix - (unsigned char)*str; -} - #endif /* __SUBCMD_UTIL_H */ |