From: Jens Axboe Date: Tue, 29 Dec 2015 00:14:46 +0000 (-0700) Subject: Fix included getopt locations X-Git-Tag: fio-2.4~27 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=f87cc56144a77e2e9b485eb7ddb064cf2da5f9a1 Fix included getopt locations Signed-off-by: Jens Axboe --- diff --git a/fio.h b/fio.h index 66211e9d..b71a4864 100644 --- a/fio.h +++ b/fio.h @@ -32,7 +32,7 @@ #include "profile.h" #include "fio_time.h" #include "gettime.h" -#include "lib/getopt.h" +#include "oslib/getopt.h" #include "lib/rand.h" #include "lib/rbtree.h" #include "client.h" diff --git a/init.c b/init.c index 991fa1ce..77cf9f2a 100644 --- a/init.c +++ b/init.c @@ -26,7 +26,7 @@ #include "idletime.h" #include "filelock.h" -#include "lib/getopt.h" +#include "oslib/getopt.h" #include "oslib/strcasestr.h" #include "crc/test.h" diff --git a/lib/getopt.h b/lib/getopt.h deleted file mode 100644 index bc8a2684..00000000 --- a/lib/getopt.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifdef CONFIG_GETOPT_LONG_ONLY - -#include - -#else - -#ifndef _GETOPT_H -#define _GETOPT_H - -struct option { - const char *name; - int has_arg; - int *flag; - int val; -}; - -enum { - no_argument = 0, - required_argument = 1, - optional_argument = 2, -}; - -int getopt_long_only(int, char *const *, const char *, const struct option *, int *); - -#endif -#endif diff --git a/oslib/getopt.h b/oslib/getopt.h new file mode 100644 index 00000000..bc8a2684 --- /dev/null +++ b/oslib/getopt.h @@ -0,0 +1,26 @@ +#ifdef CONFIG_GETOPT_LONG_ONLY + +#include + +#else + +#ifndef _GETOPT_H +#define _GETOPT_H + +struct option { + const char *name; + int has_arg; + int *flag; + int val; +}; + +enum { + no_argument = 0, + required_argument = 1, + optional_argument = 2, +}; + +int getopt_long_only(int, char *const *, const char *, const struct option *, int *); + +#endif +#endif