Add missing includes to sample watchdog program. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
18 lines
282 B
C
18 lines
282 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <unistd.h>
|
|
#include <fcntl.h>
|
|
|
|
int main(int argc, const char *argv[]) {
|
|
int fd = open("/dev/watchdog", O_WRONLY);
|
|
if (fd == -1) {
|
|
perror("watchdog");
|
|
exit(1);
|
|
}
|
|
while (1) {
|
|
write(fd, "\0", 1);
|
|
fsync(fd);
|
|
sleep(10);
|
|
}
|
|
}
|