Browse Source

Introduce compat.h, for Win32 builds

nfactor-troky
Jeff Garzik 14 years ago committed by Jeff Garzik
parent
commit
352bab2109
  1. 15
      compat.h
  2. 1
      cpu-miner.c

15
compat.h

@ -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__ */

1
cpu-miner.c

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

Loading…
Cancel
Save