Browse Source

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

nfactor-troky
Con Kolivas 13 years ago
parent
commit
16aff37c66
  1. 28
      adl.c
  2. 3
      adl.h

28
adl.c

@ -1,25 +1,25 @@ @@ -1,25 +1,25 @@
#include "miner.h"
#include "adl.h"
bool adl_active;
#include "config.h"
#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 <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"
bool adl_active;
int opt_hysteresis = 3;
int opt_targettemp = 75;
int opt_overheattemp = 85;

3
adl.h

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

Loading…
Cancel
Save