Fix included getopt locations
authorJens Axboe <axboe@fb.com>
Tue, 29 Dec 2015 00:14:46 +0000 (17:14 -0700)
committerJens Axboe <axboe@fb.com>
Tue, 29 Dec 2015 00:14:46 +0000 (17:14 -0700)
Signed-off-by: Jens Axboe <axboe@fb.com>
fio.h
init.c
lib/getopt.h [deleted file]
oslib/getopt.h [new file with mode: 0644]

diff --git a/fio.h b/fio.h
index 66211e9da74d80cafc2398ddf001ed8ff0499a8c..b71a48648eaf4f2b95e5ed6015ff8e445911c074 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -32,7 +32,7 @@
 #include "profile.h"
 #include "fio_time.h"
 #include "gettime.h"
 #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"
 #include "lib/rand.h"
 #include "lib/rbtree.h"
 #include "client.h"
diff --git a/init.c b/init.c
index 991fa1ce3f46f8880345798425018d167568f2b3..77cf9f2ac8b32e7000f72abe0ff681183fba17fa 100644 (file)
--- a/init.c
+++ b/init.c
@@ -26,7 +26,7 @@
 #include "idletime.h"
 #include "filelock.h"
 
 #include "idletime.h"
 #include "filelock.h"
 
-#include "lib/getopt.h"
+#include "oslib/getopt.h"
 #include "oslib/strcasestr.h"
 
 #include "crc/test.h"
 #include "oslib/strcasestr.h"
 
 #include "crc/test.h"
diff --git a/lib/getopt.h b/lib/getopt.h
deleted file mode 100644 (file)
index bc8a268..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#ifdef CONFIG_GETOPT_LONG_ONLY
-
-#include <getopt.h>
-
-#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 (file)
index 0000000..bc8a268
--- /dev/null
@@ -0,0 +1,26 @@
+#ifdef CONFIG_GETOPT_LONG_ONLY
+
+#include <getopt.h>
+
+#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