镜像自地址
https://git.tukaani.org/xz.git
已同步 2026-10-31 03:14:56 +00:00
liblzma: Includes sys/time.h conditionally in mythread
Previously, <sys/time.h> was always included, even if mythread only used clock_gettime. <time.h> is still needed even if clock_gettime is not used though because struct timespec is needed for mythread_condtime.
这个提交包含在:
父节点
9e3cb514b5
当前提交
501c6013d4
@ -100,12 +100,18 @@ mythread_sigmask(int how, const sigset_t *restrict set,
|
|||||||
// Using pthreads //
|
// Using pthreads //
|
||||||
////////////////////
|
////////////////////
|
||||||
|
|
||||||
#include <sys/time.h>
|
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
|
// If clock_gettime() isn't available, use gettimeofday() from <sys/time.h>
|
||||||
|
// as a fallback. gettimeofday() is in SUSv2 and thus is supported on all
|
||||||
|
// relevant POSIX systems.
|
||||||
|
#if !defined(HAVE_CLOCK_GETTIME)
|
||||||
|
# include <sys/time.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define MYTHREAD_RET_TYPE void *
|
#define MYTHREAD_RET_TYPE void *
|
||||||
#define MYTHREAD_RET_VALUE NULL
|
#define MYTHREAD_RET_VALUE NULL
|
||||||
|
|
||||||
|
|||||||
正在加载...
x
在新工单中引用
屏蔽一个用户