[PR PATCH] [Closed]: Fix compatibility issues with the timespec struct

github at samba.org github at samba.org
Fri Aug 28 10:46:30 UTC 2020


There's a closed pull request on the Samba Samba Github repository

Fix compatibility issues with the timespec struct
https://github.com/samba-team/samba/pull/212
Description: I'm compiling `ffmpeg` with `--enable-libsmbclient`. During the configuration phase I'm getting:
```
./ffbuild/config.log:/usr/include/samba-4.0/libsmbclient.h:158:18: error: field 'btime_ts' has incomplete type
./ffbuild/config.log:/usr/include/samba-4.0/libsmbclient.h:162:18: error: field 'mtime_ts' has incomplete type
./ffbuild/config.log:/usr/include/samba-4.0/libsmbclient.h:166:18: error: field 'atime_ts' has incomplete type
./ffbuild/config.log:/usr/include/samba-4.0/libsmbclient.h:170:18: error: field 'ctime_ts' has incomplete type
```

The problem appears to be that the `timespec` struct is not defined. Including `time.h` solves the issue. It can be reproduced in 4.9.1, but not in 4.8.

In a somewhat related note - libsmbclient.h currently cannot be used with `--std=c99` because of the dependency on `timespec`.


More information about the samba-technical mailing list