Make lib/rand.c a stand-alone library
authorTomohiro Kusumi <tkusumi@tuxera.com>
Fri, 14 Apr 2017 21:06:22 +0000 (00:06 +0300)
committerJens Axboe <axboe@fb.com>
Wed, 26 Apr 2017 18:43:10 +0000 (12:43 -0600)
It needs to include pattern.h from local directory where rand.c
is also located, to be able to use this as a stand-alone library,
which is useful for debugging purpose. In fact, most of the files
under lib/ directory do things this way.

--
 # cat ./test7.c
 #include <stdio.h>
 #include "lib/rand.h"
 int main(void) {
         /* just to see if it compiles */
         init_rand(NULL, 0);
         return 0;
 }
 # gcc -Wall -g -DBITS_PER_LONG=64 ./test7.c ./lib/rand.c ./lib/pattern.c ./lib/strntol.c

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
lib/rand.c

index 9c3e0d6a39e181149ad04ac5c36f7220d115de95..3f60a67ab7a9c195260405024d7badba18b0a871 100644 (file)
@@ -36,7 +36,7 @@
 #include <string.h>
 #include <assert.h>
 #include "rand.h"
 #include <string.h>
 #include <assert.h>
 #include "rand.h"
-#include "lib/pattern.h"
+#include "pattern.h"
 #include "../hash.h"
 
 int arch_random;
 #include "../hash.h"
 
 int arch_random;