diff options
author | Julio M. Merino Vidal <jmmv@NetBSD.org> | 2006-04-09 10:50:43 +0000 |
---|---|---|
committer | BenoƮt Dejean <bdejean@src.gnome.org> | 2006-04-09 10:50:43 +0000 |
commit | 3c21c70b6446bba94829d17c18ce89f1124c07d1 (patch) | |
tree | a6867ec29a53778d92b1a90cc0d86ec5c0281243 /sysdeps/freebsd | |
parent | 9e6115f32274de354766659715ad0fb347bf7d00 (diff) | |
download | libgtop-3c21c70b6446bba94829d17c18ce89f1124c07d1.tar.gz |
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.
Diffstat (limited to 'sysdeps/freebsd')
-rw-r--r-- | sysdeps/freebsd/msg_limits.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sysdeps/freebsd/msg_limits.c b/sysdeps/freebsd/msg_limits.c index 4886e9ad..4d40dc69 100644 --- a/sysdeps/freebsd/msg_limits.c +++ b/sysdeps/freebsd/msg_limits.c @@ -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 |