[vlc-devel] [PATCH 1/4] include: add vlc_search.h for differences between POSIX search.h and other OS

Steve Lhomme robux4 at ycbcr.xyz
Mon Jul 15 13:38:40 CEST 2019


---
 include/vlc_search.h | 33 +++++++++++++++++++++++++++++++++
 src/Makefile.am      |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 include/vlc_search.h

diff --git a/include/vlc_search.h b/include/vlc_search.h
new file mode 100644
index 0000000000..7ca6e6d2dd
--- /dev/null
+++ b/include/vlc_search.h
@@ -0,0 +1,33 @@
+/*****************************************************************************
+ * vlc_search.h: replacement header for search.h
+ *****************************************************************************
+ * Copyright © 2019 the VideoLAN project
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+/**
+ * \file
+ * This file is a collection of portability fixes
+ */
+
+#ifndef LIBVLC_SEARCH_H
+# define LIBVLC_SEARCH_H 1
+
+#ifdef HAVE_SEARCH_H
+#include <search.h>
+#endif
+
+#endif /* !LIBVLC_SEARCH_H */
diff --git a/src/Makefile.am b/src/Makefile.am
index 8c56c0e165..c68e0490b4 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -88,6 +88,7 @@ pluginsinclude_HEADERS = \
 	../include/vlc_fingerprinter.h \
 	../include/vlc_interrupt.h \
 	../include/vlc_renderer_discovery.h \
+	../include/vlc_search.h \
 	../include/vlc_sort.h \
 	../include/vlc_sout.h \
 	../include/vlc_spu.h \
-- 
2.17.1



More information about the vlc-devel mailing list