]> git.sesse.net Git - vlc/commitdiff
* configure.ac, modules/access/smb.c: compilation fix for new libsmbclient versions...
authorGildas Bazin <gbazin@videolan.org>
Fri, 2 Sep 2005 18:18:03 +0000 (18:18 +0000)
committerGildas Bazin <gbazin@videolan.org>
Fri, 2 Sep 2005 18:18:03 +0000 (18:18 +0000)
configure.ac
modules/access/smb.c

index 210bc0d76d463200228db29b815ccb0a2ca2ebf9..0646cf481340957596c29ef90f99b43860a792a0 100644 (file)
@@ -1553,6 +1553,9 @@ if test "${enable_smb}" != "no"; then
     [ if test -n "${enable_smb}"; then
         AC_MSG_ERROR([cannot find libsmbclient headers])
      fi ])
+  AC_CHECK_MEMBER([struct _SMBCCTX.close_fn],
+    AC_DEFINE([HAVE__SMBCCTX_CLOSE_FN], [1], [Define if samba has _SMBCCTX.close_fn]),,
+    [#include <libsmbclient.h>])
 fi
 
 dnl
index 2489e96a973d0702528e5784abf46115445f75b2..1c953cea0bbbb15150a7c980c69c91751b8614c4 100644 (file)
@@ -301,7 +301,11 @@ static void Close( vlc_object_t *p_this )
     access_sys_t *p_sys = p_access->p_sys;
 
 #ifdef USE_CTX
+#  ifndef HAVE__SMBCCTX_CLOSE_FN
     p_sys->p_smb->close( p_sys->p_smb, p_sys->p_file );
+#  else
+    p_sys->p_smb->close_fn( p_sys->p_smb, p_sys->p_file );
+#  endif
     smbc_free_context( p_sys->p_smb, 1 );
 #else
     smbc_close( p_sys->i_smb );