Skip to content

Commit

Permalink
Move C files to be included by go mod
Browse files Browse the repository at this point in the history
  • Loading branch information
afontaine committed Jun 1, 2020
1 parent 42aec72 commit e20920c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion host/host_darwin_cgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package host
// #cgo LDFLAGS: -framework IOKit
// #include <stdio.h>
// #include <string.h>
// #include "include/smc.c"
// #include "smc_darwin.h"
import "C"
import "context"

Expand Down
2 changes: 1 addition & 1 deletion host/include/smc.c → host/smc_darwin.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "smc.h"
#include "smc_darwin.h"

#define IOSERVICE_SMC "AppleSMC"
#define IOSERVICE_MODEL "IOPlatformExpertDevice"
Expand Down
6 changes: 3 additions & 3 deletions host/include/smc.h → host/smc_darwin.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __SMC_H__
#define __SMC_H__ 1
#ifndef __SMC_DARWIN_H__
#define __SMC_DARWIN_H__ 1

#include <IOKit/IOKitLib.h>

Expand Down Expand Up @@ -29,4 +29,4 @@ kern_return_t open_smc(void);
kern_return_t close_smc(void);
double get_temperature(char *);

#endif // __SMC_H__
#endif // __SMC_DARWIN_H__

0 comments on commit e20920c

Please sign in to comment.