[vlc-commits] contrib: enable IPv6 support in libsmb2
Pierre Lamot
git at videolan.org
Wed Jun 3 12:06:54 CEST 2020
vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Thu May 28 15:44:02 2020 +0200| [2149dc73f4f17c47ac542baf394c779fcc143a00] | committer: Pierre Lamot
contrib: enable IPv6 support in libsmb2
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2149dc73f4f17c47ac542baf394c779fcc143a00
---
.../0006-IPv6-is-available-on-all-platforms.patch | 46 ++++++++++++++++++++++
contrib/src/smb2/rules.mak | 1 +
2 files changed, 47 insertions(+)
diff --git a/contrib/src/smb2/0006-IPv6-is-available-on-all-platforms.patch b/contrib/src/smb2/0006-IPv6-is-available-on-all-platforms.patch
new file mode 100644
index 0000000000..4ae3931483
--- /dev/null
+++ b/contrib/src/smb2/0006-IPv6-is-available-on-all-platforms.patch
@@ -0,0 +1,46 @@
+From 0ddce21e13cd032adba26260f977b54d395f98c7 Mon Sep 17 00:00:00 2001
+From: Ronnie Sahlberg <ronniesahlberg at gmail.com>
+Date: Thu, 20 Feb 2020 13:39:27 +1000
+Subject: [PATCH] IPv6 is available on all platforms. No need to check for it
+
+We weren't even checking for this in configure.ac anyway.
+
+Signed-off-by: Ronnie Sahlberg <ronniesahlberg at gmail.com>
+---
+ CMakeLists.txt | 2 +-
+ lib/socket.c | 2 --
+ 2 files changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index adc5060..f96c713 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -38,7 +38,7 @@ set(core_DEPENDS ${GSSAPI_LIBRARIES} CACHE STRING "" FORCE)
+
+ if(CMAKE_SYSTEM_NAME MATCHES Windows)
+ list(APPEND CORE_LIBRARIES ws2_32.lib)
+- add_definitions(-DWIN32_LEAN_AND_MEAN -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -DHAVE_SOCKADDR_IN6)
++ add_definitions(-DWIN32_LEAN_AND_MEAN -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS)
+ include_directories(include/msvc)
+ elseif(CMAKE_SYSTEM_NAME STREQUAL Solaris)
+ find_library(SOCKET_LIBRARY socket)
+diff --git a/lib/socket.c b/lib/socket.c
+index 3cdecef..6340788 100644
+--- a/lib/socket.c
++++ b/lib/socket.c
+@@ -744,7 +744,6 @@ smb2_connect_async(struct smb2_context *smb2, const char *server,
+ ((struct sockaddr_in *)&ss)->sin_len = socksize;
+ #endif
+ break;
+-#ifdef HAVE_SOCKADDR_IN6
+ case AF_INET6:
+ socksize = sizeof(struct sockaddr_in6);
+ memcpy(&ss, ai->ai_addr, socksize);
+@@ -752,7 +751,6 @@ smb2_connect_async(struct smb2_context *smb2, const char *server,
+ ((struct sockaddr_in6 *)&ss)->sin6_len = socksize;
+ #endif
+ break;
+-#endif
+ default:
+ smb2_set_error(smb2, "Unknown address family :%d. "
+ "Only IPv4/IPv6 supported so far.",
diff --git a/contrib/src/smb2/rules.mak b/contrib/src/smb2/rules.mak
index 6e9c21e6af..587c8ad2d1 100644
--- a/contrib/src/smb2/rules.mak
+++ b/contrib/src/smb2/rules.mak
@@ -23,6 +23,7 @@ smb2: libsmb2-$(SMB2_VERSION).tar.gz .sum-smb2
$(APPLY) $(SRC)/smb2/0003-Fix-getlogin-usage.patch
$(APPLY) $(SRC)/smb2/0004-smb2_destroy_context-fix-possible-null-deref.patch
$(APPLY) $(SRC)/smb2/0005-smb2_connect_share_async-don-t-return-ENOMEM-if-conn.patch
+ $(APPLY) $(SRC)/smb2/0006-IPv6-is-available-on-all-platforms.patch
$(MOVE)
.smb2: smb2
More information about the vlc-commits
mailing list