]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
libcephfs: include <sys/time.h> 41391/head
authorKefu Chai <kchai@redhat.com>
Wed, 19 May 2021 01:18:33 +0000 (09:18 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 19 May 2021 01:21:19 +0000 (09:21 +0800)
commitc52f35948707ad36f194b92d5dd6af12ec9f2dda
tree59f9de8ee423e3a9a123389559fb43f82d7212ad
parentee9ae39d80b1b7d8d79c03e661ff83d4d9d3bfac
libcephfs: include <sys/time.h>

header files should be self-contained. we are using `timeval` in the header,
but failed to include the header defining it.

this change addresses the build failures on Darwin like:

int ceph_lutimes(struct ceph_mount_info *cmount, const char *path, struct timeval times[2]);
                                                                          ^
src/include/cephfs/libcephfs.h:1080:78: error: array has incomplete element type 'struct timeval'
int ceph_futimes(struct ceph_mount_info *cmount, int fd, struct timeval times[2]);
                                                                             ^
src/include/cephfs/libcephfs.h:1080:65: note: forward declaration of 'struct timeval'
int ceph_futimes(struct ceph_mount_info *cmount, int fd, struct timeval times[2]);
                                                                ^
3 errors generated.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/include/cephfs/libcephfs.h