runit

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

seek_set.c (206B)


      1 /* Public domain. */
      2 
      3 #include <sys/types.h>
      4 #include <unistd.h>
      5 #include "seek.h"
      6 
      7 #define SET 0 /* sigh */
      8 
      9 int seek_set(int fd,seek_pos pos)
     10 { if (lseek(fd,(off_t) pos,SET) == -1) return -1; return 0; }