diff --git a/sys/sys/errno.h b/sys/sys/errno.h index 52efd3193a0e..b6056d2f4cb0 100644 --- a/sys/sys/errno.h +++ b/sys/sys/errno.h @@ -184,7 +184,7 @@ __END_DECLS #define ELAST 96 /* Must be equal largest errno */ #endif /* _POSIX_SOURCE */ -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_WANT_KERNEL_ERRNO) /* pseudo-errors returned inside kernel to modify return to process */ #define ERESTART (-1) /* restart syscall */ #define EJUSTRETURN (-2) /* don't modify regs, just return */ diff --git a/usr.bin/kdump/kdump.c b/usr.bin/kdump/kdump.c index 1ee1c84a9e5c..199ecdd53837 100644 --- a/usr.bin/kdump/kdump.c +++ b/usr.bin/kdump/kdump.c @@ -41,10 +41,7 @@ static char sccsid[] = "@(#)kdump.c 8.1 (Berkeley) 6/6/93"; #include __FBSDID("$FreeBSD$"); -#define _KERNEL -extern int errno; -#include -#undef _KERNEL +#define _WANT_KERNEL_ERRNO #include #include #include