#3350 closed defect (fixed)

sptimecounter02 warning due to defining _KERNEL and disabling part of <sys/time.h>

Reported by: Joel Sherrill Owned by: Sebastian Huber
Priority: normal Milestone: 5.1
Component: rtems Version: 5
Severity: normal Keywords:
Cc: Blocked By:


The bottom of <sys/time.h> is protected by ifndef _KERNEL where gettimeofday() is prototyped. sptimecounter02 is the only test which trips this.

In file included from /home/joel/rtems-work/rtems-testing/rtems/rtems/cpukit/include/rtems/confdefs.h:323:0,

from ../../../../../../../rtems/c/src/../../testsuites/sptests/sptimecounter02/init.c:268:

/home/joel/rtems-work/rtems-testing/rtems/rtems/cpukit/include/rtems/imfs.h: In function 'IMFS_update_atime':
/home/joel/rtems-work/rtems-testing/rtems/rtems/cpukit/include/rtems/imfs.h:345:3: warning: implicit declaration of function 'gettimeofday' [-Wimplicit-function-declaration]

gettimeofday( &now, 0 );

Change History (2)

comment:1 Changed on 03/15/18 at 22:32:44 by Joel Sherrill

Owner: changed from sebastian to Sebastian Huber

comment:2 Changed on 03/16/18 at 07:22:01 by Sebastian Huber <sebastian.huber@…>

Resolution: fixed
Status: assignedclosed

In 478dc89/rtems:

imfs: Use most efficient way to get the time

As a side-effect, this fixes some warnings.

Close #3350.

Note: See TracTickets for help on using tickets.