[PR PATCH] Fix compatibility issues with the timespec struct

github at samba.org github at samba.org
Fri Oct 19 08:31:41 UTC 2018


There is a new pull request by joankaradimov against master on the Samba Samba Github repository

https://github.com/joankaradimov/samba timespec-compatibility
https://github.com/samba-team/samba/pull/212

Fix compatibility issues with the timespec struct
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`.

A patch file from https://github.com/samba-team/samba/pull/212.patch is attached
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: github-pr-timespec-compatibility-212.patch
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20181019/9a9b256e/github-pr-timespec-compatibility-212.patch>


More information about the samba-technical mailing list