blob: 041fa99335f24ca0363719d500177fc95f7467bc (
plain)
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
|
Index: src/util/os_file.c
--- src/util/os_file.c.orig
+++ src/util/os_file.c
@@ -86,6 +86,8 @@ os_dupfd_cloexec(int fd)
typedef ptrdiff_t ssize_t;
#endif
+#if DETECT_OS_LINUX
+
static ssize_t
readN(int fd, char *buf, size_t len)
{
@@ -186,7 +188,6 @@ os_read_file(const char *filename, size_t *size)
return buf;
}
-#if DETECT_OS_LINUX
#include <sys/syscall.h>
#include <unistd.h>
@@ -207,6 +208,13 @@ os_same_file_description(int fd1, int fd2)
}
#else
+
+char *
+os_read_file(const char *filename, size_t *size)
+{
+ errno = -ENOSYS;
+ return NULL;
+}
int
os_same_file_description(int fd1, int fd2)
|