[vlc-commits] contrib: smb2: Fix macOS compilation
David Fuhrmann
git at videolan.org
Wed Feb 13 18:44:12 CET 2019
vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Wed Feb 13 18:42:58 2019 +0100| [dbd816319d091f88cf6ab0bb516a7d2ad5f7c426] | committer: David Fuhrmann
contrib: smb2: Fix macOS compilation
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dbd816319d091f88cf6ab0bb516a7d2ad5f7c426
---
...oes-not-exist-on-darwin-use-posix-ENODEV-.patch | 25 ++++++++++++++++++++++
contrib/src/smb2/rules.mak | 1 +
2 files changed, 26 insertions(+)
diff --git a/contrib/src/smb2/0001-ENOMEDIUM-does-not-exist-on-darwin-use-posix-ENODEV-.patch b/contrib/src/smb2/0001-ENOMEDIUM-does-not-exist-on-darwin-use-posix-ENODEV-.patch
new file mode 100644
index 0000000000..93763dd660
--- /dev/null
+++ b/contrib/src/smb2/0001-ENOMEDIUM-does-not-exist-on-darwin-use-posix-ENODEV-.patch
@@ -0,0 +1,25 @@
+From 2256d19bc9fead528bac900d894d65e9b030f7f8 Mon Sep 17 00:00:00 2001
+From: "S. Davilla" <davilla at 4pi.com>
+Date: Mon, 22 Oct 2018 20:53:15 -0400
+Subject: [PATCH] ENOMEDIUM does not exist on darwin, use posix ENODEV instead
+
+---
+ lib/errors.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/errors.c b/lib/errors.c
+index f2696c0..3612f9a 100644
+--- a/lib/errors.c
++++ b/lib/errors.c
+@@ -218,7 +218,7 @@ int nterror_to_errno(uint32_t status) {
+ case SMB2_STATUS_MEDIA_WRITE_PROTECTED:
+ return EROFS;
+ case SMB2_STATUS_NO_MEDIA_IN_DEVICE:
+- return ENOMEDIUM;
++ return ENODEV;
+ case SMB2_STATUS_DATA_ERROR:
+ case SMB2_STATUS_CRC_ERROR:
+ case SMB2_STATUS_DEVICE_DATA_ERROR:
+--
+2.17.2 (Apple Git-113)
+
diff --git a/contrib/src/smb2/rules.mak b/contrib/src/smb2/rules.mak
index 62c000a1d7..c14f58964f 100644
--- a/contrib/src/smb2/rules.mak
+++ b/contrib/src/smb2/rules.mak
@@ -19,6 +19,7 @@ $(TARBALLS)/libsmb2-$(SMB2_VERSION).tar.gz:
smb2: libsmb2-$(SMB2_VERSION).tar.gz .sum-smb2
$(UNPACK)
$(APPLY) $(SRC)/smb2/0001-master-backport.patch
+ $(APPLY) $(SRC)/smb2/0001-ENOMEDIUM-does-not-exist-on-darwin-use-posix-ENODEV-.patch
$(MOVE)
.smb2: smb2
More information about the vlc-commits
mailing list