aboutsummaryrefslogtreecommitdiff
path: root/include/compat/unistd.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/compat/unistd.h')
-rw-r--r--include/compat/unistd.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/compat/unistd.h b/include/compat/unistd.h
index d596043..e70a390 100644
--- a/include/compat/unistd.h
+++ b/include/compat/unistd.h
@@ -7,7 +7,16 @@
7#define LIBCRYPTOCOMPAT_UNISTD_H 7#define LIBCRYPTOCOMPAT_UNISTD_H
8 8
9#ifndef _MSC_VER 9#ifndef _MSC_VER
10
10#include_next <unistd.h> 11#include_next <unistd.h>
12
13#ifdef __MINGW32__
14int ftruncate(int fd, off_t length);
15uid_t getuid(void);
16ssize_t pread(int d, void *buf, size_t nbytes, off_t offset);
17ssize_t pwrite(int d, const void *buf, size_t nbytes, off_t offset);
18#endif
19
11#else 20#else
12 21
13#include <stdlib.h> 22#include <stdlib.h>
@@ -22,10 +31,19 @@
22#define X_OK 0 31#define X_OK 0
23#define F_OK 0 32#define F_OK 0
24 33
34#define SEEK_SET 0
35#define SEEK_CUR 1
36#define SEEK_END 2
37
25#define access _access 38#define access _access
26 39
27unsigned int sleep(unsigned int seconds); 40unsigned int sleep(unsigned int seconds);
28 41
42int ftruncate(int fd, off_t length);
43uid_t getuid(void);
44ssize_t pread(int d, void *buf, size_t nbytes, off_t offset);
45ssize_t pwrite(int d, const void *buf, size_t nbytes, off_t offset);
46
29#endif 47#endif
30 48
31#ifndef HAVE_GETENTROPY 49#ifndef HAVE_GETENTROPY