summaryrefslogtreecommitdiffstats
path: root/include/unistd.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/unistd.h')
-rw-r--r--include/unistd.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/include/unistd.h b/include/unistd.h
new file mode 100644
index 0000000..d8e6ef1
--- /dev/null
+++ b/include/unistd.h
@@ -0,0 +1,23 @@
+#ifdef HAVE_UNISTD_H
+#include_next <unistd.h>
+#endif
+
+/* From posix/unistd.h. */
+#ifndef TEMP_FAILURE_RETRY
+# define TEMP_FAILURE_RETRY(expression) \
+ (__extension__ \
+ ({ long int __result; \
+ do __result = (long int) (expression); \
+ while (__result == -1L && errno == EINTR); \
+ __result; }))
+#endif
+
+#ifndef HAVE_FTRUNCATE64
+#define HAVE_FTRUNCATE64 1
+#define ftruncate64(FD, LEN) ftruncate (FD, LEN)
+#endif
+
+#ifndef HAVE_LSEEK64
+#define HAVE_LSEEK64 1
+#define lseek64(FD, OFF, WHENCE) lseek (FD, OFF, WHENCE)
+#endif