[LU-6835] lfs.c:481: error: implicit declaration of function 'futimes' Created: 10/Jul/15  Updated: 31/Jul/15  Resolved: 25/Jul/15

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.8.0

Type: Bug Priority: Minor
Reporter: Chris Horn Assignee: Bob Glossman (Inactive)
Resolution: Fixed Votes: 0
Labels: patch

Issue Links:
Related
is related to LU-6264 Enable strict compiler defence modes Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

Looks like a regression from http://review.whamcloud.com/15217 (a801262)

[  280s] gcc -DHAVE_CONFIG_H -I. -I../..   -include /usr/src/packages/BUILD/cray-lustre/config.h -I/usr/src/packages/BUILD/cray-lustre/libcfs/include -I/usr/src/packages/BUILD/cray-lustre/lnet/include -I/usr/src/packages/BUILD/cray-lustre/lustre/include  -fPIC -D_GNU_SOURCE -D_LARGEFILE64_SOURCE=1 -D_FILE_OFFSET_BITS=64 -DLUSTRE_UTILS=1 -fmessage-length=0 -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -Werror -fno-stack-protector -I/opt/cray-hss-devel/7.3.0/include  -Werror -MT lfs.o -MD -MP -MF .deps/lfs.Tpo -c -o lfs.o lfs.c
[  280s] cc1: warnings being treated as errors
[  280s] lfs.c: In function 'migrate_copy_timestamps':
[  280s] lfs.c:481: error: implicit declaration of function 'futimes'

I think lfs.c just needs to include sys/time.h.



 Comments   
Comment by Gerrit Updater [ 10/Jul/15 ]

Chris Horn (hornc@cray.com) uploaded a new patch: http://review.whamcloud.com/15563
Subject: LU-6835 build: include sys/time.h in lfs.c
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 00287ec94fa409b94b6f52e544e86aa4af45cd2a

Comment by Peter Jones [ 10/Jul/15 ]

Bob

Could you please look over this patch?

Thanks

Peter

Comment by John Hammond [ 10/Jul/15 ]

This is also addressed by http://review.whamcloud.com/#/c/15392/.

Comment by James A Simmons [ 10/Jul/15 ]

Adding in the -Wall flag should prevent things like this in the future.

Comment by James A Simmons [ 10/Jul/15 ]

As a suggestion we push a patch for the lnet utils as well that does the same thing.

Comment by Gerrit Updater [ 25/Jul/15 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/15392/
Subject: LU-6835 build: add -Wall to CFLAGS for test/ and utils/
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: b80d263bed6d4756ecc471129822612104f01487

Comment by Peter Jones [ 25/Jul/15 ]

Landed for 2.8

Generated at Sat Feb 10 02:03:40 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.