Fix compiler errors
This commit is contained in:
@@ -20,7 +20,7 @@ tinydfs_server$(EXT): $(CFILES) $(HFILES)
|
||||
gcc -o $@ $(CFILES) $(CFLAGS) $(LFLAGS) -Iinc
|
||||
|
||||
example_client$(EXT): examples/main.c $(CFILES) $(HFILES)
|
||||
gcc -o $@ examples/main.c $(CFILES) $(CFLAGS) $(LFLAGS) -Iinc
|
||||
gcc -o $@ examples/main.c $(CFILES) $(CFLAGS) $(LFLAGS) -Iinc -DBUILD_LIBRARY
|
||||
|
||||
clean:
|
||||
rm \
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#ifdef _WIN32
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
+1
-4
@@ -8,12 +8,10 @@
|
||||
#endif
|
||||
|
||||
#include "tcp.h"
|
||||
#include "config.h"
|
||||
#include "message.h"
|
||||
#include <TinyDFS.h>
|
||||
|
||||
#define MAX_OPERATIONS 128
|
||||
#define MAX_REQUESTS_PER_QUEUE 128
|
||||
|
||||
#define TAG_METADATA_SERVER -2
|
||||
#define TAG_METADATA_SERVER_TO_CLIENT -3
|
||||
|
||||
@@ -88,7 +86,6 @@ struct TinyDFS {
|
||||
|
||||
int num_operations;
|
||||
Operation operations[MAX_OPERATIONS];
|
||||
|
||||
};
|
||||
|
||||
TinyDFS *tinydfs_init(char *addr, uint16_t port)
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
#ifndef CONFIG_INCLUDED
|
||||
#define CONFIG_INCLUDED
|
||||
|
||||
#define MAX_SERVER_ADDRS 4
|
||||
#define MAX_CHUNK_SERVERS 128
|
||||
#define MAX_OPERATIONS 128
|
||||
#define MAX_REQUESTS_PER_QUEUE 128
|
||||
|
||||
#endif // CONFIG_INCLUDED
|
||||
@@ -1,3 +1,5 @@
|
||||
#ifndef BUILD_LIBRARY
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "chunk_server.h"
|
||||
@@ -43,3 +45,5 @@ int main(int argc, char **argv)
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif // BUILD_LIBRARY
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "tcp.h"
|
||||
#include "file_tree.h"
|
||||
#include "config.h"
|
||||
|
||||
#define CONNECTION_TAG_CLIENT -1
|
||||
#define CONNECTION_TAG_UNKNOWN -2
|
||||
|
||||
Reference in New Issue
Block a user