Making use of use smb2_get_fds breaks build with libsmb2 3.0.0
This commit on the VLC 3 branch broke building with the current release of libsmb2 3.0.0...
http://git.videolan.org/?p=vlc/vlc-3.0.git;a=commit;h=e44f69983a408df2bbc7d614f7ffe912e644c6b6
cc -DHAVE_CONFIG_H -I. -I.. -DMODULE_STRING="smb2" -D__PLUGIN__ -I./access -I./codec -I../include -I../include -I/usr/X11R6/include -I/usr/local/include -I/usr/local/include -O2 -pipe -Werror=unknown-warning-option -Werror=invalid-command-line-argument -Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wvolatile-register-var -Wformat -Wformat-security -Wbad-function-cast -Wwrite-strings -Wmissing-prototypes -Werror-implicit-function-declaration -Winit-self -fvisibility=hidden -fno-math-errno -funsafe-math-optimizations -fno-rounding-math -funroll-loops -fomit-frame-pointer -fstack-protector-strong -MT access/libsmb2_plugin_la-smb2.lo -MD -MP -MF access/.deps/libsmb2_plugin_la-smb2.Tpo -c access/smb2.c -fPIC -DPIC -o access/.libs/libsmb2_plugin_la-smb2.o
access/smb2.c:166:31: error: implicit declaration of function 'smb2_get_fds' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
const t_socket *fds = smb2_get_fds(sys->smb2, &fd_count, &smb2_timeout);
^
access/smb2.c:166:31: note: did you mean 'smb2_get_fd'?
/usr/local/include/smb2/libsmb2.h:115:10: note: 'smb2_get_fd' declared here
t_socket smb2_get_fd(struct smb2_context *smb2);
^
access/smb2.c:166:25: warning: incompatible integer to pointer conversion initializing 'const t_socket *' (aka 'const int *') with an expression of type 'int' [-Wint-conversion]
const t_socket *fds = smb2_get_fds(sys->smb2, &fd_count, &smb2_timeout);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
access/smb2.c:204:22: error: implicit declaration of function 'smb2_service_fd' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
else if (smb2_service_fd(sys->smb2, -1, 0) < 0)
^
access/smb2.c:204:22: note: did you mean 'smb2_service'?
/usr/local/include/smb2/libsmb2.h:130:5: note: 'smb2_service' declared here
int smb2_service(struct smb2_context *smb2, int revents);
^
access/smb2.c:212:21: error: implicit declaration of function 'smb2_service_fd' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
&& smb2_service_fd(sys->smb2, p_fds[i].fd, p_fds[i].revents) < 0)
^
access/smb2.c:237:5: warning: unused variable 'sys' [-Wunused-variable]
VLC_SMB2_GENERIC_CB();
^
access/smb2.c:227:24: note: expanded from macro 'VLC_SMB2_GENERIC_CB'
struct access_sys *sys = access->p_sys; \
^
2 warnings and 3 errors generated.