From 42c6875555b40209c8e795a58868018510f1a25d Mon Sep 17 00:00:00 2001 From: Lomanic Date: Sun, 31 May 2020 20:01:47 +0200 Subject: [PATCH] [host][darwin][cgo] Fix #832 work around once-again broken go modules not including C files Supersedes #885 by @afontaine --- host/host_darwin_cgo.go | 4 +--- host/{include/smc.c => smc_darwin.c} | 4 +++- host/{include/smc.h => smc_darwin.h} | 0 3 files changed, 4 insertions(+), 4 deletions(-) rename host/{include/smc.c => smc_darwin.c} (98%) rename host/{include/smc.h => smc_darwin.h} (100%) diff --git a/host/host_darwin_cgo.go b/host/host_darwin_cgo.go index 283d8bdd9..9b3b1c436 100644 --- a/host/host_darwin_cgo.go +++ b/host/host_darwin_cgo.go @@ -4,9 +4,7 @@ package host // #cgo LDFLAGS: -framework IOKit -// #include -// #include -// #include "include/smc.c" +// #include "smc_darwin.h" import "C" import "context" diff --git a/host/include/smc.c b/host/smc_darwin.c similarity index 98% rename from host/include/smc.c rename to host/smc_darwin.c index 256a441f5..aedea8be9 100644 --- a/host/include/smc.c +++ b/host/smc_darwin.c @@ -1,4 +1,6 @@ -#include "smc.h" +#include +#include +#include "smc_darwin.h" #define IOSERVICE_SMC "AppleSMC" #define IOSERVICE_MODEL "IOPlatformExpertDevice" diff --git a/host/include/smc.h b/host/smc_darwin.h similarity index 100% rename from host/include/smc.h rename to host/smc_darwin.h