[Pkg-samba-maint] Bug#946840: libsmbclient-dev: libsmbclient.h: field *_ts has incomplete type

The Wanderer wanderer at fastmail.fm
Mon Dec 16 13:34:37 GMT 2019


Package: libsmbclient-dev
Version: 2:4.11.1+dfsg-3
Severity: important
Tags: patch upstream

Dear Maintainer,

When I attempt to compile FFmpeg from current git HEAD with the
'--enable-libsmbclient' configure flag, detection of libsmbclient fails
with the following errors:

---8<---
In file included from /tmp/ffconf.29iCgpHh/test.c:1:
/usr/include/samba-4.0/libsmbclient.h:168:18: error: field 'btime_ts'
has incomplete type
  168 |  struct timespec btime_ts;
      |                  ^~~~~~~~
/usr/include/samba-4.0/libsmbclient.h:172:18: error: field 'mtime_ts'
has incomplete type
  172 |  struct timespec mtime_ts;
      |                  ^~~~~~~~
/usr/include/samba-4.0/libsmbclient.h:176:18: error: field 'atime_ts'
has incomplete type
  176 |  struct timespec atime_ts;
      |                  ^~~~~~~~
/usr/include/samba-4.0/libsmbclient.h:180:18: error: field 'ctime_ts'
has incomplete type
  180 |  struct timespec ctime_ts;
      |                  ^~~~~~~~
/usr/include/samba-4.0/libsmbclient.h:1134:38: warning: 'struct timeval'
declared inside parameter list will not be visible outside of this
definition or declaration
 1134 |                               struct timeval *tbuf);
      |                                      ^~~~~~~
/usr/include/samba-4.0/libsmbclient.h:1953:41: warning: 'struct timeval'
declared inside parameter list will not be visible outside of this
definition or declaration
 1953 | int smbc_utimes(const char *url, struct timeval *tbuf);
      |
---8<---

This appears to have been discussed upstream in late 2018 (both on a
samba-related mailing list and on a GitHub pull request,
https://github.com/samba-team/samba/pull/212), but although the patch
provided there for fixing the problem was acknowledged, it does not seem
to have been committed. The issue seems to be simply a failure to
include time.h in libsmbclient.h.

https://github.com/samba-team/samba/pull/212/commits/11e8c14b78e2423041f3846882f74cd6490a3e44
is the patch; if it would help for me to do the work of extracting that
into an apply-able diff, I can certainly do so.

If I apply this patch to my local copy of libsmbclient.h, detection
passes, the build completes, and the resulting binary appears to be
usable. (Although I am currently in a position to test its SMB-related
functionality.)

Please apply this patch, and/or check with upstream about getting them
to do so.

Alternatively, if there is some reason why including time.h here would
be inappropriate (e.g. a documented requirement that users of this API
do so themselves), please indicate where to find a clear indication of
that fact so that I can take that to the FFmpeg developers.


-- System Information:
Debian Release: bullseye/sid
  APT prefers testing
  APT policy: (900, 'testing'), (800, 'stable'), (500, 'testing-debug')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.2.0-3-amd64 (SMP w/12 CPU cores)
Kernel taint flags: TAINT_WARN
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
LSM: AppArmor: enabled

Versions of packages libsmbclient-dev depends on:
ii  dpkg          1.19.7
ii  libsmbclient  2:4.11.1+dfsg-3

libsmbclient-dev recommends no packages.

libsmbclient-dev suggests no packages.

-- no debconf information



More information about the Pkg-samba-maint mailing list