I was trying to read a file using pread(), but I got "Implicit declaration of function 'pread' is invalid in C99". Is there any way to handle this?
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
#include <sys/stat.h>
#include <fcntl.h>
int main(int argc, char **argv)
{
char dst[20];
int file = open("file.txt", O_RDONLY);
int read_res = pread(file, dst, 10, 3);
close(file);
return 0;
}