[patch] FreeBSD fix for cfg_dir Re: Bug: cfg_dir doesn't work on solaris..?
Jan Grant
jan.grant at bristol.ac.uk
Tue Jan 22 19:34:19 CET 2008
On Tue, 22 Jan 2008, Jan Grant wrote:
> To get this working under FreeBSD it may be simply sufficient to hack a
>
> [[[
> #define _DIRENT_HAVE_D_TYPE
> ]]]
>
> into include/config.h before making...
>
> ...hm, having just tried it, that might just sort you out :-)
Attached is a patch against nagios-2.10 which detects the "missing"
_DIRENT_HAVE_D_TYPE on BSD systems (the heuristic is to look for
DT_UNKNOWN) and defines it in those cases.
It's a bit of a hack, but the attached diff makes nagios compile cleanly
on FreeBSD and gets cffg_dir recursing properly.
I'll sort out something for Solaris over the next day or so.
Cheers,
jan
--
jan grant, ISYS, University of Bristol. http://www.bris.ac.uk/
Tel +44 (0)117 3317661 http://ioctl.org/jan/
Unfortunately, I have a very good idea how fast my keys are moving.
-------------- next part --------------
--- include/config.h.in.orig 2008-01-22 18:22:04.000000000 +0000
+++ include/config.h.in 2008-01-22 18:27:08.000000000 +0000
@@ -218,6 +218,12 @@
#undef HAVE_DIRENT_H
#ifdef HAVE_DIRENT_H
#include <dirent.h>
+#ifndef _DIRENT_HAVE_D_TYPE
+#ifdef DT_UNKNOWN
+/* A good indication of d_type: set the following glibc flag */
+#define _DIRENT_HAVE_D_TYPE
+#endif
+#endif
#endif
#undef HAVE_PTHREAD_H
-------------- next part --------------
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
-------------- next part --------------
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel
More information about the Developers
mailing list