diff options
author | Yujie Qin <yujieqin@google.com> | 2016-04-05 14:58:42 +0200 |
---|---|---|
committer | Yujie Qin <yujieqin@google.com> | 2016-04-05 15:16:26 +0200 |
commit | e95f96bb9d29978211250ee764ba78731ad316df (patch) | |
tree | 4c7034560ffdae04d2c9d3d902dc3550f891089e | |
parent | 41c8c9a5da5cc3a2474b9e4a06736e533e6eb00e (diff) | |
download | dng_sdk-e95f96bb9d29978211250ee764ba78731ad316df.tar.gz |
Define dng_timespec as timespec for VS2015 and aboveandroid-n-preview-2
-rw-r--r-- | source/dng_pthread.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/dng_pthread.h b/source/dng_pthread.h index 2095321..4572e31 100644 --- a/source/dng_pthread.h +++ b/source/dng_pthread.h @@ -53,11 +53,16 @@ #endif -// Use the standard "timespec" struct for VS2015 and above from <time.h>. Define -// "dng_timespec" as "timespec" otherwise. +// Use the standard "timespec" struct as "dng_timespec" for VS2015 and above +// from <time.h>. Define "dng_timespec" as "timespec" otherwise. #if _MSC_VER >= 1900 #include <time.h> +#define dng_timespec timespec #else +struct dng_timespec { + long tv_sec; + long tv_nsec; +}; #define timespec dng_timespec #endif @@ -70,11 +75,6 @@ extern "C" #define DNG_ETIMEDOUT 60 /* Operation timed out */ -struct dng_timespec { - long tv_sec; - long tv_nsec; -}; - typedef unsigned long dng_pthread_t; typedef struct dng_pthread_mutex_impl *dng_pthread_mutex_t; |