-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpvs2c.patch
More file actions
45 lines (42 loc) · 1.5 KB
/
pvs2c.patch
File metadata and controls
45 lines (42 loc) · 1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
diff --git a/src/groundeval/c-primitive-attachments.lisp b/src/groundeval/c-primitive-attachments.lisp
index 2509a899..07486e0e 100644
--- a/src/groundeval/c-primitive-attachments.lisp
+++ b/src/groundeval/c-primitive-attachments.lisp
@@ -627,7 +627,7 @@
uint32_t size = s.st_size;
uint32_t capacity = 4096 * (size/4096 + 1);
char * contents = (char *) mmap(NULL, capacity, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
- file_t ff = (file_t) safe_malloc(sizeof(file_s));
+ file_t ff = (file_t) safe_malloc(sizeof(struct file_s));
ff->count = 1;
ff->fd = fd;
ff->size = size;
@@ -653,7 +653,7 @@
uint32_t size = s.st_size;
uint32_t capacity = 4096 * (size/4096 + 1);
char * contents = (char *) mmap(NULL, capacity, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
- file_t ff = (file_t) safe_malloc(sizeof(file_s));
+ file_t ff = (file_t) safe_malloc(sizeof(struct file_s));
ff->count = 1;
ff->fd = fd;
ff->size = size;
diff --git a/src/groundeval/pvslib.h b/src/groundeval/pvslib.h
index aac228e0..2f219a76 100644
--- a/src/groundeval/pvslib.h
+++ b/src/groundeval/pvslib.h
@@ -258,7 +258,7 @@ struct stringliteral_s {
uint32_t size;
uint32_t max;
uint32_t elems[];
-} stringliteral_s;
+};
typedef struct stringliteral_s * stringliteral_t;
uint32_t code(uint32_t x);
@@ -290,7 +290,7 @@ struct file_s {
uint32_t capacity;
char * name;
char * contents;
-} file_s;
+};
typedef struct file_s * file_t;
extern void release_file__file(file_t file);