Introduce compat.h, for Win32 builds

This commit is contained in:
Jeff Garzik 2010-11-26 15:50:36 -05:00 committed by Jeff Garzik
parent b7cc9b68ad
commit 352bab2109
2 changed files with 16 additions and 0 deletions

15
compat.h Normal file
View file

@ -0,0 +1,15 @@
#ifndef __COMPAT_H__
#define __COMPAT_H__
#ifdef WIN32
#include <windows.h>
static inline void sleep(int secs)
{
Sleep(secs * 1000);
}
#endif /* WIN32 */
#endif /* __COMPAT_H__ */

View file

@ -20,6 +20,7 @@
#include <pthread.h>
#include <getopt.h>
#include <jansson.h>
#include "compat.h"
#include "miner.h"
#define PROGRAM_NAME "minerd"