This commit is contained in:
Jay D Dee
2023-10-28 16:22:14 -04:00
parent 160608cce5
commit 46dca7a493
20 changed files with 3092 additions and 2297 deletions

13
miner.h
View File

@@ -20,7 +20,7 @@
#define USER_AGENT_OS
#endif
#define USER_AGENT PACKAGE_NAME "-" PACKAGE_VERSION "-" USER_AGENT_ARCH "-" USER_AGENT_OS
#define USER_AGENT PACKAGE_NAME "-" PACKAGE_VERSION "-" USER_AGENT_ARCH USER_AGENT_OS
//#define MAX_CPUS 128
@@ -46,7 +46,7 @@
#include <stdbool.h>
#include <inttypes.h>
#include <sys/time.h>
#include <unistd.h>
#include <pthread.h>
#include <jansson.h>
#include <curl/curl.h>
@@ -76,6 +76,15 @@
#endif
static inline bool is_root()
{
#if defined(WIN32)
return false;
#else
return !getuid();
#endif
}
/*
#ifndef min
#define min(a,b) (a>b ? (b) :(a))