From c84d88fa7cc296838fc88392878869fc968e5ca3 Mon Sep 17 00:00:00 2001 From: darylm503 Date: Wed, 2 Nov 2011 23:41:29 +0000 Subject: StdLib: Fix dirent structure members to be of the correct type. The type of the time values in a UEFI directory entry are EFI_TIME, not timeval. Signed-off-by: darylm503 Reviewed-by: lgrosenb git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12651 6f19259b-4bc3-4df7-8a09-765794883524 --- StdLib/Include/sys/dirent.h | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'StdLib/Include') diff --git a/StdLib/Include/sys/dirent.h b/StdLib/Include/sys/dirent.h index 64b46e4d46..2c171de5b7 100644 --- a/StdLib/Include/sys/dirent.h +++ b/StdLib/Include/sys/dirent.h @@ -43,10 +43,11 @@ @(#)dirent.h 8.3 (Berkeley) 8/10/94 NetBSD: dirent.h,v 1.23 2005/12/26 18:41:36 perry Exp **/ - #ifndef _SYS_DIRENT_H_ #define _SYS_DIRENT_H_ +#include + #include #include #include @@ -70,13 +71,19 @@ struct dirent { UINT64 FileSize; // The size of the file in bytes. UINT64 PhysicalSize; // The amount of physical space the file consumes // on the file system volume. - struct timespec CreateTime; // The time the file was created. - struct timespec LastAccessTime; // The time when the file was last accessed. - struct timespec ModificationTime; // The time when the file's contents were last modified. + EFI_TIME CreateTime; // The time the file was created. + EFI_TIME LastAccessTime; // The time when the file was last accessed. + EFI_TIME ModificationTime; // The time when the file's contents were last modified. UINT64 Attribute; // (d_type) The attribute bits for the file. See below. CHAR16 FileName[1]; // (d_name) The Null-terminated name of the file. }; +/* For compatibility */ +#define d_name FileName +#define d_type Attribute +#define d_reclen Size + + /* * File Attributes */ -- cgit v1.2.3