From cc36b5a5e2e8df6e633bb767df84ac1e61c56bc3 Mon Sep 17 00:00:00 2001 From: Richard Braun Date: Tue, 26 Feb 2013 22:24:42 +0100 Subject: Add the timespec_t Hurd type This type matches the standard struct timespec, and allows passing time values with nanosecond precision in RPCs. * hurd/hurd_types.defs (timespec_t): New MIG type. * hurd/hurd_types.h: Include . (timespec_t): New C type, aliasing struct timespec. --- hurd/hurd_types.defs | 2 ++ hurd/hurd_types.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/hurd/hurd_types.defs b/hurd/hurd_types.defs index 5ad5e93f..4b325043 100644 --- a/hurd/hurd_types.defs +++ b/hurd/hurd_types.defs @@ -230,6 +230,8 @@ type rusage_t = struct[18] of int; /* XXX */ type flock_t = struct[5] of int; +type timespec_t = struct[2] of int; + #define _SYS_UTSNAME_H /* Inhibit warning from . */ #include type utsname_t = struct[5 * _UTSNAME_LENGTH] of char; diff --git a/hurd/hurd_types.h b/hurd/hurd_types.h index e1a644f1..7d1bb732 100644 --- a/hurd/hurd_types.h +++ b/hurd/hurd_types.h @@ -20,6 +20,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef _HURD_TYPES_H #define _HURD_TYPES_H +#include /* For struct timespec. */ #include /* For mach_port_t et al. */ #include /* For mach_msg_id_t et al. */ #include /* For pid_t and uid_t. */ @@ -69,6 +70,7 @@ typedef struct statfs fsys_statfsbuf_t; typedef struct stat64 io_statbuf_t; typedef struct statfs64 fsys_statfsbuf_t; #endif +typedef struct timespec timespec_t; /* Parameters and flags in RPC calls */ -- cgit v1.2.3