Skip to content

Commit 1ea3578

Browse files
add license
1 parent cc52474 commit 1ea3578

File tree

3 files changed

+30
-4
lines changed

3 files changed

+30
-4
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 Davidson Souza
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Makefile.am

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ AUTOMAKE_OPTIONS = foreign
22

33
SUBDIRS = include
44

5-
# Shared
5+
check_PROGRAMS = test_flat_file test_forest
6+
test_flat_file_SOURCES = src/test_flat_file.c
7+
8+
test_forest_SOURCES = src/forest_test.c
9+
test_forest_LDADD = libutreexo.la -lcrypto
10+
611
lib_LTLIBRARIES = libutreexo.la
712
libutreexo_la_SOURCES = src/mmap_forest.c

src/flat_file_impl.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ static inline void utreexo_forest_file_init(struct utreexo_forest_file **file,
4747

4848
const int fsize = lseek(fd, 0, SEEK_END);
4949

50-
char *data = (char *)mmap((void *)MAP_ORIGIN, MAP_SIZE,
51-
PROT_READ | PROT_WRITE | PROT_GROWSUP,
52-
MAP_FILE | MAP_SHARED | MAP_FIXED, fd, 0);
50+
char *data =
51+
(char *)mmap((void *)MAP_ORIGIN, MAP_SIZE, PROT_READ | PROT_WRITE,
52+
MAP_FILE | MAP_SHARED | MAP_FIXED, fd, 0);
5353

5454
if (data == MAP_FAILED || data != (void *)MAP_ORIGIN) {
5555
perror("mmap");

0 commit comments

Comments
 (0)