summaryrefslogtreecommitdiff
path: root/src/libstddjb/seek_set.c
blob: b5883ac99565682171d55f081c91753eb83cead6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* ISC license. */

#include <sys/types.h>
#include <unistd.h>
#include <skalibs/djbunix.h>

#define SET 0 /* sigh */

int seek_set (int fd, long pos)
{
  if (lseek(fd, (off_t) pos, SET) == -1) return -1 ;
  return 0 ;
}