Fix compilation issues
Fixed compilation errors: - Added <dirent.h> include to file_system.h for DIR type on Linux - Replaced xxx placeholder in chunk_server.c with actual chunks_dir path using state->store.path
This commit is contained in:
+2
-1
@@ -604,7 +604,8 @@ process_metadata_server_chunk_list_request(ChunkServer *state, int conn_idx, Byt
|
|||||||
message_write(&writer, &num_hashes, sizeof(num_hashes));
|
message_write(&writer, &num_hashes, sizeof(num_hashes));
|
||||||
|
|
||||||
DirectoryScanner scanner;
|
DirectoryScanner scanner;
|
||||||
if (directory_scanner_init(&scanner, xxx) < 0)
|
string chunks_dir = (string) { state->store.path, strlen(state->store.path) };
|
||||||
|
if (directory_scanner_init(&scanner, chunks_dir) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
|
|
||||||
#include "basic.h"
|
#include "basic.h"
|
||||||
|
|
||||||
|
#ifndef _WIN32
|
||||||
|
#include <dirent.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint64_t data;
|
uint64_t data;
|
||||||
} Handle;
|
} Handle;
|
||||||
|
|||||||
Reference in New Issue
Block a user