From: Jaroslav Kysela Date: Fri, 6 Oct 2006 09:01:40 +0000 (+0200) Subject: Add struct timeval and timespec definition when _POSIX_C_SOURCE is not defined X-Git-Tag: v1.0.14rc1~27 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=8c9e4114a23aad96b4b9570624a4fd96745dfe01;p=alsa-lib.git Add struct timeval and timespec definition when _POSIX_C_SOURCE is not defined FIXME: It might cause problems on some platforms when tv_usec is not long type. --- diff --git a/include/global.h b/include/global.h index 760c6871..7b8c176a 100644 --- a/include/global.h +++ b/include/global.h @@ -130,6 +130,18 @@ int snd_shm_area_destroy(struct snd_shm_area *area); int snd_user_file(const char *file, char **result); +#ifndef _POSIC_C_SOURCE +struct timeval { + time_t tv_sec; /* seconds */ + long tv_usec; /* microseconds */ +}; + +struct timespec { + time_t tv_sec; /* seconds */ + long tv_nsec; /* nanoseconds */ +}; +#endif + /** Timestamp */ typedef struct timeval snd_timestamp_t; /** Hi-res timestamp */