Include unistd.h for read(), write() and stdlib.h for exit().
Bump WARNS to 5 while being here.
This commit is contained in:
parent
d632071e0e
commit
12a91a4387
@ -68,6 +68,7 @@
|
||||
#
|
||||
PROG= testcdev
|
||||
NO_MAN=
|
||||
WARNS= 5
|
||||
|
||||
MODSTAT= /sbin/kldstat
|
||||
|
||||
|
@ -70,13 +70,15 @@
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
#include <sys/types.h>
|
||||
#include <sys/ioccom.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <paths.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/ioccom.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define CDEV_IOCTL1 _IOR('C', 1, u_int)
|
||||
#define CDEV_DEVICE "cdev"
|
||||
@ -85,7 +87,7 @@ static char writestr[] = "Hello kernel!";
|
||||
static char buf[512+1];
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
main(int argc __unused, char *argv[] __unused)
|
||||
{
|
||||
int kernel_fd;
|
||||
int one;
|
||||
|
Loading…
Reference in New Issue
Block a user