vlc | branch: master | Hugo Beauzée-Luyssen <[email protected]> | Wed Nov 21 15:00:40 2018 +0100| [f0db80ae63572f2f811f8b5295e91d10058dd3d8] | committer: Hugo Beauzée-Luyssen
contribs: smb: Fix pipe compat function > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f0db80ae63572f2f811f8b5295e91d10058dd3d8 --- contrib/src/libdsm/fix-pipe-compat.patch | 65 ++++++++++++++++++++++++++++++++ contrib/src/libdsm/rules.mak | 1 + 2 files changed, 66 insertions(+) diff --git a/contrib/src/libdsm/fix-pipe-compat.patch b/contrib/src/libdsm/fix-pipe-compat.patch new file mode 100644 index 0000000000..b966190dc2 --- /dev/null +++ b/contrib/src/libdsm/fix-pipe-compat.patch @@ -0,0 +1,65 @@ +From e9849895aeb378a59e6cc545540c8b8eecba7fba Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Hugo=20Beauz=C3=A9e-Luyssen?= <[email protected]> +Date: Wed, 21 Nov 2018 13:27:12 +0100 +Subject: [PATCH] compat: Fix pipe compat function + +The compatibility function was never built since we were forcing +HAVE_PIPE in compat.h +--- + Makefile.am | 2 +- + compat/compat.c | 11 ----------- + compat/compat.h | 6 +++++- + 3 files changed, 6 insertions(+), 13 deletions(-) + delete mode 100644 compat/compat.c + +diff --git a/Makefile.am b/Makefile.am +index 5c191cf..6dde7bc 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -88,7 +88,7 @@ libdsm_la_SOURCES = \ + src/smb_utils.c + + noinst_LTLIBRARIES = libcompat.la +-libcompat_la_SOURCES = compat/compat.c ++libcompat_la_SOURCES = + libcompat_la_LIBADD = $(LTLIBOBJS) + + pkgconfigdir = $(libdir)/pkgconfig +diff --git a/compat/compat.c b/compat/compat.c +deleted file mode 100644 +index c3c6f9e..0000000 +--- a/compat/compat.c ++++ /dev/null +@@ -1,11 +0,0 @@ +-#include "config.h" +- +-#if !defined(HAVE_PIPE) && defined(HAVE__PIPE) +- +-#include <fcntl.h> +- +-int pipe(int fds[2]) +-{ +- return _pipe(fds, 32768, O_NOINHERIT | O_BINARY); +-} +-#endif +diff --git a/compat/compat.h b/compat/compat.h +index 50b102c..4eef355 100644 +--- a/compat/compat.h ++++ b/compat/compat.h +@@ -66,8 +66,12 @@ char *strndup(const char *str, size_t n); + #endif + + #if !defined(HAVE_PIPE) && defined(HAVE__PIPE) ++#include <fcntl.h> + #define HAVE_PIPE +-int pipe(int fds[2]); ++static inline int pipe(int fds[2]) ++{ ++ return _pipe(fds, 32768, O_NOINHERIT | O_BINARY); ++} + #endif + + #ifndef _WIN32 +-- +2.19.1 + diff --git a/contrib/src/libdsm/rules.mak b/contrib/src/libdsm/rules.mak index 8cc0b2968c..79a235333f 100644 --- a/contrib/src/libdsm/rules.mak +++ b/contrib/src/libdsm/rules.mak @@ -22,6 +22,7 @@ libdsm: libdsm-$(LIBDSM_VERSION).tar.gz .sum-libdsm $(UNPACK) $(APPLY) $(SRC)/libdsm/0001-build-fix-nl_langinfo-detection-on-Android.patch $(APPLY) $(SRC)/libdsm/fix-pc-generation.patch + $(APPLY) $(SRC)/libdsm/fix-pipe-compat.patch $(MOVE) DEPS_libdsm = libtasn1 iconv _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
