diff --git a/cpukit/libnetworking/rtems/rtems_bsdnet.h b/cpukit/libnetworking/rtems/rtems_bsdnet.h index 6447749f80..3152099525 100644 --- a/cpukit/libnetworking/rtems/rtems_bsdnet.h +++ b/cpukit/libnetworking/rtems/rtems_bsdnet.h @@ -7,6 +7,28 @@ #include +/* + * If this file is included from inside the Network Stack proper or + * a device driver, then __INSIDE_RTEMS_BSD_TCPIP_STACK__ should be + * defined. This triggers a number of internally used definitions. + */ + +#if defined(__INSIDE_RTEMS_BSD_TCPIP_STACK__) +#undef _COMPILING_BSD_KERNEL_ +#undef KERNEL +#undef INET +#undef NFS +#undef DIAGNOSTIC +#undef BOOTP_COMPAT + +#define _COMPILING_BSD_KERNEL_ +#define KERNEL +#define INET +#define NFS +#define DIAGNOSTIC +#define BOOTP_COMPAT +#endif + /* * Values that may be obtained by BOOTP */