Skip to content

Commit

Permalink
Windows fix: make sure it compiles on Windows and sysfs support is di…
Browse files Browse the repository at this point in the history
…sabled unless the platform is Linux.
  • Loading branch information
Wolf authored and OhGodAGirl committed Dec 3, 2016
1 parent 159ba6e commit 5546b4b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions sysfs-gpu-controls.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@ int sysfs_set_engineclock(int gpu, int iEngineClock) { }
int sysfs_set_memoryclock(int gpu, int iMemoryClock) { }
int sysfs_set_powertune(int gpu, int iPercentage) { }

#ifndef __linux__

void GetGPUHWMonPath(char **HWMonPath, uint32_t GPUIdx)
{
*HWMonPath = NULL;
}

#else

// Must be freed by caller unless NULL
void GetGPUHWMonPath(char **HWMonPath, uint32_t GPUIdx)
{
Expand Down Expand Up @@ -54,6 +63,8 @@ void GetGPUHWMonPath(char **HWMonPath, uint32_t GPUIdx)
return;
}

#endif

int ReadSysFSFile(uint8_t *Buffer, char *Filename, uint32_t BufSize)
{
FILE *fd;
Expand Down

0 comments on commit 5546b4b

Please sign in to comment.