[vlc-commits] use proper check for the search.h availability

Steve Lhomme git at videolan.org
Tue Oct 23 17:25:22 CEST 2018


vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Apr 12 14:15:32 2018 +0200| [01083e39ba11271165f9679648b665b13b155c73] | committer: Thomas Guillem

use proper check for the search.h availability

(cherry picked from commit 3cea7a78999068f71972094e849f95c1591d3e3a)
Signed-off-by: Thomas Guillem <thomas at gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=01083e39ba11271165f9679648b665b13b155c73
---

 modules/access/dtv/access.c        | 2 ++
 modules/services_discovery/pulse.c | 2 ++
 modules/services_discovery/udev.c  | 2 ++
 modules/video_output/xcb/keysym.c  | 2 ++
 4 files changed, 8 insertions(+)

diff --git a/modules/access/dtv/access.c b/modules/access/dtv/access.c
index 9ab0504268..d9756c7b48 100644
--- a/modules/access/dtv/access.c
+++ b/modules/access/dtv/access.c
@@ -29,7 +29,9 @@
 #include <vlc_input.h>
 #include <vlc_plugin.h>
 #include <vlc_dialog.h>
+#ifdef HAVE_SEARCH_H
 #include <search.h>
+#endif
 
 #include "dtv/dtv.h"
 
diff --git a/modules/services_discovery/pulse.c b/modules/services_discovery/pulse.c
index 2c0771d200..8797664f2e 100644
--- a/modules/services_discovery/pulse.c
+++ b/modules/services_discovery/pulse.c
@@ -24,7 +24,9 @@
 # include <config.h>
 #endif
 
+#ifdef HAVE_SEARCH_H
 #include <search.h>
+#endif
 #include <assert.h>
 
 #include <vlc_common.h>
diff --git a/modules/services_discovery/udev.c b/modules/services_discovery/udev.c
index 8ac528b89d..ae5c4c85ef 100644
--- a/modules/services_discovery/udev.c
+++ b/modules/services_discovery/udev.c
@@ -25,7 +25,9 @@
 #endif
 
 #include <errno.h>
+#ifdef HAVE_SEARCH_H
 #include <search.h>
+#endif
 #include <poll.h>
 #include <sys/stat.h>
 #include <fcntl.h>
diff --git a/modules/video_output/xcb/keysym.c b/modules/video_output/xcb/keysym.c
index 7333bd9005..4ec7d28dd1 100644
--- a/modules/video_output/xcb/keysym.c
+++ b/modules/video_output/xcb/keysym.c
@@ -25,7 +25,9 @@
 #include <stdlib.h>
 #include <inttypes.h>
 #include <limits.h>
+#ifdef HAVE_SEARCH_H
 #include <search.h>
+#endif
 #include <assert.h>
 
 struct keysym



More information about the vlc-commits mailing list