summaryrefslogtreecommitdiffstats
path: root/seek_set.c
diff options
context:
space:
mode:
Diffstat (limited to 'seek_set.c')
-rw-r--r--seek_set.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/seek_set.c b/seek_set.c
new file mode 100644
index 0000000..d08d4f3
--- /dev/null
+++ b/seek_set.c
@@ -0,0 +1,7 @@
+#include <sys/types.h>
+#include "seek.h"
+
+#define SET 0 /* sigh */
+
+int seek_set(int fd,seek_pos pos)
+{ if (lseek(fd,(off_t) pos,SET) == -1) return -1; return 0; }