diff options
author | t3sserakt <t3ss@posteo.de> | 2023-10-03 17:17:16 +0200 |
---|---|---|
committer | t3sserakt <t3ss@posteo.de> | 2023-10-03 17:17:16 +0200 |
commit | 6f68c34aa3deed8e1b5df30d3de1342386523920 (patch) | |
tree | 940221996f82d1edd77530ac2b1abbb61ccf08ac /src/fs | |
parent | ed76bf2ece671e9543477a9bb9130dfbe5fa5a4d (diff) | |
parent | 109f3188ba65b788990427d6d26ba8874a9b84f5 (diff) | |
download | gnunet-6f68c34aa3deed8e1b5df30d3de1342386523920.tar.gz gnunet-6f68c34aa3deed8e1b5df30d3de1342386523920.zip |
Merge branch 'master' into l20integration
Diffstat (limited to 'src/fs')
-rw-r--r-- | src/fs/meson.build | 141 | ||||
-rw-r--r-- | src/fs/meta_data.c | 3 |
2 files changed, 143 insertions, 1 deletions
diff --git a/src/fs/meson.build b/src/fs/meson.build new file mode 100644 index 000000000..63a5d9a39 --- /dev/null +++ b/src/fs/meson.build | |||
@@ -0,0 +1,141 @@ | |||
1 | libgnunetfs_src = ['fs_api.c', | ||
2 | 'fs_directory.c', | ||
3 | 'fs_dirmetascan.c', | ||
4 | 'fs_download.c', | ||
5 | 'fs_file_information.c', | ||
6 | 'fs_getopt.c', | ||
7 | 'fs_list_indexed.c', | ||
8 | 'fs_publish.c', | ||
9 | 'fs_publish_ksk.c', | ||
10 | 'fs_publish_ublock.c', | ||
11 | 'fs_misc.c', | ||
12 | 'fs_namespace.c', | ||
13 | 'fs_search.c', | ||
14 | 'fs_sharetree.c', | ||
15 | 'fs_tree.c', | ||
16 | 'fs_unindex.c', | ||
17 | 'fs_uri.c', | ||
18 | 'meta_data.c'] | ||
19 | |||
20 | gnunetservicefs_src = ['gnunet-service-fs.c', | ||
21 | 'gnunet-service-fs_cp.c', | ||
22 | 'gnunet-service-fs_indexing.c', | ||
23 | 'gnunet-service-fs_pe.c', | ||
24 | 'gnunet-service-fs_pr.c', | ||
25 | 'gnunet-service-fs_push.c', | ||
26 | 'gnunet-service-fs_put.c', | ||
27 | 'gnunet-service-fs_cadet_client.c', | ||
28 | 'gnunet-service-fs_cadet_server.c'] | ||
29 | |||
30 | configure_file(input : 'fs.conf.in', | ||
31 | output : 'fs.conf', | ||
32 | configuration : cdata, | ||
33 | install: true, | ||
34 | install_dir: pkgcfgdir) | ||
35 | |||
36 | |||
37 | if get_option('monolith') | ||
38 | foreach p : libgnunetfs_src + gnunetservicefs_src | ||
39 | gnunet_src += 'fs/' + p | ||
40 | endforeach | ||
41 | endif | ||
42 | |||
43 | libgnunetfs = library('gnunetfs', | ||
44 | libgnunetfs_src, | ||
45 | soversion: '2', | ||
46 | version: '2.1.1', | ||
47 | dependencies: [libgnunetutil_dep, | ||
48 | libgnunetdatastore_dep, | ||
49 | libgnunetstatistics_dep, | ||
50 | unistr_dep], | ||
51 | include_directories: [incdir, configuration_inc], | ||
52 | install: true, | ||
53 | install_dir: get_option('libdir')) | ||
54 | libgnunetfs_dep = declare_dependency(link_with : libgnunetfs) | ||
55 | pkg.generate(libgnunetfs, url: 'https://www.gnunet.org', | ||
56 | description : 'Provides API for GNUnet File-Sharing service') | ||
57 | |||
58 | shared_module('gnunet_plugin_block_fs', | ||
59 | ['plugin_block_fs.c'], | ||
60 | dependencies: [libgnunetutil_dep, | ||
61 | libgnunetblockgroup_dep], | ||
62 | include_directories: [incdir, configuration_inc], | ||
63 | install:true, | ||
64 | install_dir: get_option('libdir')/'gnunet') | ||
65 | |||
66 | executable ('gnunet-search', | ||
67 | 'gnunet-search.c', | ||
68 | dependencies: [libgnunetfs_dep, | ||
69 | libgnunetutil_dep], | ||
70 | include_directories: [incdir, configuration_inc], | ||
71 | install: true, | ||
72 | install_dir: get_option('bindir')) | ||
73 | executable ('gnunet-unindex', | ||
74 | 'gnunet-unindex.c', | ||
75 | dependencies: [libgnunetfs_dep, | ||
76 | libgnunetutil_dep], | ||
77 | include_directories: [incdir, configuration_inc], | ||
78 | install: true, | ||
79 | install_dir: get_option('bindir')) | ||
80 | executable ('gnunet-auto-share', | ||
81 | 'gnunet-auto-share.c', | ||
82 | dependencies: [libgnunetfs_dep, | ||
83 | libgnunetutil_dep], | ||
84 | include_directories: [incdir, configuration_inc], | ||
85 | install: true, | ||
86 | install_dir: get_option('bindir')) | ||
87 | executable ('gnunet-directory', | ||
88 | 'gnunet-directory.c', | ||
89 | dependencies: [libgnunetfs_dep, | ||
90 | libgnunetutil_dep], | ||
91 | include_directories: [incdir, configuration_inc], | ||
92 | install: true, | ||
93 | install_dir: get_option('bindir')) | ||
94 | executable ('gnunet-download', | ||
95 | 'gnunet-download.c', | ||
96 | dependencies: [libgnunetfs_dep, | ||
97 | libgnunetutil_dep], | ||
98 | include_directories: [incdir, configuration_inc], | ||
99 | install: true, | ||
100 | install_dir: get_option('bindir')) | ||
101 | executable ('gnunet-fs', | ||
102 | 'gnunet-fs.c', | ||
103 | dependencies: [libgnunetfs_dep, | ||
104 | libgnunetutil_dep], | ||
105 | include_directories: [incdir, configuration_inc], | ||
106 | install: true, | ||
107 | install_dir: get_option('bindir')) | ||
108 | executable ('gnunet-publish', | ||
109 | 'gnunet-publish.c', | ||
110 | dependencies: [libgnunetfs_dep, | ||
111 | libgnunetidentity_dep, | ||
112 | libgnunetutil_dep], | ||
113 | include_directories: [incdir, configuration_inc], | ||
114 | install: true, | ||
115 | install_dir: get_option('bindir')) | ||
116 | executable ('gnunet-service-fs', | ||
117 | gnunetservicefs_src, | ||
118 | dependencies: [libgnunetfs_dep, | ||
119 | libgnunetutil_dep, | ||
120 | libgnunetstatistics_dep, | ||
121 | libgnunetcore_dep, | ||
122 | libgnunetdht_dep, | ||
123 | libgnunetidentity_dep, | ||
124 | m_dep, | ||
125 | libgnunetats_dep, | ||
126 | libgnunetcadet_dep, | ||
127 | libgnunetpeerstore_dep, | ||
128 | libgnunetdatastore_dep, | ||
129 | libgnunetblock_dep], | ||
130 | include_directories: [incdir, configuration_inc], | ||
131 | install: true, | ||
132 | install_dir: get_option('libdir') / 'gnunet' / 'libexec') | ||
133 | executable ('gnunet-helper-fs-publish', | ||
134 | ['gnunet-helper-fs-publish.c'], | ||
135 | dependencies: [libgnunetfs_dep, | ||
136 | libgnunetutil_dep, | ||
137 | libgnunetblock_dep], | ||
138 | include_directories: [incdir, configuration_inc], | ||
139 | install: true, | ||
140 | install_dir: get_option('libdir') / 'gnunet' / 'libexec') | ||
141 | |||
diff --git a/src/fs/meta_data.c b/src/fs/meta_data.c index 7112a150a..cf9448aa4 100644 --- a/src/fs/meta_data.c +++ b/src/fs/meta_data.c | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | 28 | ||
29 | #include "gnunet_common.h" | ||
29 | #include "platform.h" | 30 | #include "platform.h" |
30 | #include "gnunet_util_lib.h" | 31 | #include "gnunet_util_lib.h" |
31 | 32 | ||
@@ -1050,7 +1051,7 @@ GNUNET_FS_meta_data_deserialize (const char *input, size_t size) | |||
1050 | * @param result the buffer to store a pointer to the (allocated) metadata | 1051 | * @param result the buffer to store a pointer to the (allocated) metadata |
1051 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure | 1052 | * @return #GNUNET_OK on success, #GNUNET_SYSERR on failure |
1052 | */ | 1053 | */ |
1053 | int | 1054 | enum GNUNET_GenericReturnValue |
1054 | GNUNET_FS_read_meta_data (struct GNUNET_BIO_ReadHandle *h, | 1055 | GNUNET_FS_read_meta_data (struct GNUNET_BIO_ReadHandle *h, |
1055 | const char *what, | 1056 | const char *what, |
1056 | struct GNUNET_FS_MetaData **result) | 1057 | struct GNUNET_FS_MetaData **result) |