[vlc-commits] commit: only include search.h if available ( anyway vlc_fixups will define the functions if needed). ( =?UTF-8?Q?R=C3=A9mi=20Duraffort=20?=)
git at videolan.org
git at videolan.org
Mon Dec 6 19:11:34 CET 2010
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Mon Dec 6 18:34:33 2010 +0100| [b983946db701561cb7c7f5136b55657e6ea4d2fb] | committer: Rémi Duraffort
only include search.h if available (anyway vlc_fixups will define the functions if needed).
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b983946db701561cb7c7f5136b55657e6ea4d2fb
---
modules/services_discovery/udev.c | 4 +++-
modules/services_discovery/xcb_apps.c | 4 +++-
src/misc/objects.c | 6 +++++-
src/misc/variables.c | 5 ++++-
4 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/modules/services_discovery/udev.c b/modules/services_discovery/udev.c
index b7b7c7f..e80c93c 100644
--- a/modules/services_discovery/udev.c
+++ b/modules/services_discovery/udev.c
@@ -29,7 +29,9 @@
#include <vlc_services_discovery.h>
#include <vlc_plugin.h>
#include <vlc_url.h>
-#include <search.h>
+#ifdef HAVE_SEARCH_H
+# include <search.h>
+#endif
#include <poll.h>
#include <errno.h>
diff --git a/modules/services_discovery/xcb_apps.c b/modules/services_discovery/xcb_apps.c
index 88927c3..6660a27 100644
--- a/modules/services_discovery/xcb_apps.c
+++ b/modules/services_discovery/xcb_apps.c
@@ -32,8 +32,10 @@ typedef xcb_atom_t Atom;
#include <vlc_dialog.h>
#include <vlc_charset.h>
#include <vlc_plugin.h>
+#ifdef HAVE_SEARCH_H
+# include <search.h>
+#endif
#include <poll.h>
-#include <search.h>
static int Open (vlc_object_t *);
static void Close (vlc_object_t *);
diff --git a/src/misc/objects.c b/src/misc/objects.c
index 8c998e4..4622ebf 100644
--- a/src/misc/objects.c
+++ b/src/misc/objects.c
@@ -47,6 +47,11 @@
#include "vlc_codec.h"
#include "variables.h"
+
+#ifdef HAVE_SEARCH_H
+# include <search.h>
+#endif
+
#ifndef WIN32
# include <unistd.h>
#else
@@ -61,7 +66,6 @@
# define close( a ) closesocket (a)
#endif
-#include <search.h>
#include <limits.h>
#include <assert.h>
diff --git a/src/misc/variables.c b/src/misc/variables.c
index 966fbac..3d3ab40 100644
--- a/src/misc/variables.c
+++ b/src/misc/variables.c
@@ -32,9 +32,12 @@
#include <vlc_charset.h>
#include "variables.h"
+#ifdef HAVE_SEARCH_H
+# include <search.h>
+#endif
+
#include "libvlc.h"
-#include <search.h>
#include <assert.h>
#include <math.h>
#include <limits.h>
More information about the vlc-commits
mailing list