1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-09 22:38:01 +00:00

Fix compilation errors on mingw32 to do with order of pulling in headers, curses.h and definition of bool.

This commit is contained in:
Con Kolivas 2011-09-06 09:36:42 +10:00
parent a1ba15fb52
commit 16aff37c66
2 changed files with 16 additions and 15 deletions

28
adl.c
View File

@ -1,25 +1,25 @@
#include "miner.h" #include "config.h"
#include "adl.h"
bool adl_active;
#ifdef HAVE_ADL #ifdef HAVE_ADL
#if defined (__linux)
#include "ADL_SDK/adl_sdk.h"
#include <dlfcn.h>
#include <stdlib.h>
#include <unistd.h>
#else
#include <windows.h>
#include <tchar.h>
#include "ADL_SDK/adl_sdk.h"
#endif
#include <stdio.h> #include <stdio.h>
#include <curses.h> #include <curses.h>
#include "miner.h"
#include "ADL_SDK/adl_sdk.h"
#if defined (__linux)
#include <dlfcn.h>
#include <stdlib.h>
#include <unistd.h>
#else
#include <windows.h>
#include <tchar.h>
#endif
#include "adl_functions.h" #include "adl_functions.h"
bool adl_active;
int opt_hysteresis = 3; int opt_hysteresis = 3;
int opt_targettemp = 75; int opt_targettemp = 75;
int opt_overheattemp = 85; int opt_overheattemp = 85;

3
adl.h
View File

@ -1,7 +1,7 @@
#ifndef __ADL_H__ #ifndef __ADL_H__
#define __ADL_H__ #define __ADL_H__
bool adl_active;
#ifdef HAVE_ADL #ifdef HAVE_ADL
bool adl_active;
int opt_hysteresis; int opt_hysteresis;
int opt_targettemp; int opt_targettemp;
int opt_overheattemp; int opt_overheattemp;
@ -19,6 +19,7 @@ void change_gpusettings(int gpu);
void gpu_autotune(int gpu); void gpu_autotune(int gpu);
void clear_adl(int nDevs); void clear_adl(int nDevs);
#else /* HAVE_ADL */ #else /* HAVE_ADL */
#define adl_active (0)
static inline void init_adl(int nDevs) {} static inline void init_adl(int nDevs) {}
static inline void change_gpusettings(int gpu) { } static inline void change_gpusettings(int gpu) { }
static inline void gpu_autotune(int gpu) { } static inline void gpu_autotune(int gpu) { }