From b5468b4acaec3794b0a3082ffe1ef27bd9d8cca3 Mon Sep 17 00:00:00 2001 From: PA4WDH Date: Sun, 21 May 2023 11:47:32 +0200 Subject: Fix all .h files --- cpufreq.h | 5 +++++ failsafe.h | 5 +++++ generate_version_h.sh | 5 +++++ sysfs.h | 5 +++++ 4 files changed, 20 insertions(+) diff --git a/cpufreq.h b/cpufreq.h index f950339..5b13010 100644 --- a/cpufreq.h +++ b/cpufreq.h @@ -1,2 +1,7 @@ +#ifndef HAVE_CPUFREQ_H +#define HAVE_CPUFREQ_H + int cpufreq_set_str(char *parameter,char *value,int checkdelay); int cpufreq_set_long_int(char *parameter,long int value,int checkdelay); + +#endif diff --git a/failsafe.h b/failsafe.h index f6b0d0d..c7c2e11 100644 --- a/failsafe.h +++ b/failsafe.h @@ -1 +1,6 @@ +#ifndef HAVE_FAILSAFE_H +#define HAVE_FAILSAFE_H + void failsafe(); + +#endif diff --git a/generate_version_h.sh b/generate_version_h.sh index 75df5a2..4ea23c0 100755 --- a/generate_version_h.sh +++ b/generate_version_h.sh @@ -4,8 +4,13 @@ VERSION=`git describe --abbrev=0` HASH=`git show --format="%h" --no-patch master` BRANCH=`git rev-parse --abbrev-ref HEAD` +echo "#ifndef HAVE_VERSION_H" +echo "#define HAVE_VERSION_H" +echo "" echo "#define VERSION \"$VERSION\"" echo "#define HASH \"$HASH\"" echo "#define BRANCH \"$BRANCH\"" echo "#define VERSION_FULL VERSION\"-\"HASH\" (\"BRANCH\")\"" echo "char* version();" +echo "" +echo "#endif" diff --git a/sysfs.h b/sysfs.h index ccd2430..3acecc9 100644 --- a/sysfs.h +++ b/sysfs.h @@ -1,3 +1,8 @@ +#ifndef HAVE_SYSFS_H +#define HAVE_SYSFS_H + int sysfs_read_str(char *sysfs_file,char *buf,size_t bufsize); long int sysfs_read_long_int(char *sysfs_file); int sysfs_write_str(char *sysfs_file,char *value,int checkdelay); + +#endif -- cgit v1.2.3