Use configure checks to detect whether we need to define either KERNEL or
2006-04-04 Julio M. Merino Vidal <jmmv@NetBSD.org> * libgtop-sysdeps.m4: * sysdeps/freebsd/msg_limits.c: Use configure checks to detect whether we need to define either KERNEL or _KERNEL to get the definition of 'struct msginfo' in a BSD system. This replaces the previous checks in the code that relied on __FreeBSD__ and similar macros. Before this change, the explicit definition of _KERNEL in the msg_limits.c file broke the build in NetBSD because it made the system headers pull in stuff unavailable to userland. Fixes bug #337207.
This commit is contained in:
committed by
Benoît Dejean
parent
9e6115f322
commit
3c21c70b64
@@ -45,11 +45,11 @@ glibtop_get_msg_limits_p (glibtop *server, glibtop_msg_limits *buf)
|
||||
|
||||
#else
|
||||
|
||||
/* #define KERNEL to get declaration of `struct msginfo'. */
|
||||
|
||||
#if (defined(__FreeBSD__) && (__FreeBSD_version < 410000)) || (defined __bsdi__)
|
||||
/* Define the appropriate macro (if any) to get declaration of `struct
|
||||
* msginfo'. Needed on, at least, FreeBSD. */
|
||||
#if defined (STRUCT_MSGINFO_NEEDS_KERNEL)
|
||||
#define KERNEL 1
|
||||
#else
|
||||
#elif defined (STRUCT_MSGINFO_NEEDS__KERNEL)
|
||||
#define _KERNEL 1
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user