From 30ba2ad71e579ed7e71549dfc49bff341408a4f9 Mon Sep 17 00:00:00 2001 From: David Cooper Date: Wed, 23 Oct 2024 16:17:58 -0400 Subject: [PATCH] Change header name --- extras/test.sh | 2 +- extras/time_preload.c | 2 +- src/fakehostname.c | 2 +- src/{common.h => fakehostname.h} | 4 ++-- src/libfakehostname.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) rename src/{common.h => fakehostname.h} (96%) diff --git a/extras/test.sh b/extras/test.sh index 5b62800..26a84de 100755 --- a/extras/test.sh +++ b/extras/test.sh @@ -92,7 +92,7 @@ fi run_test "preserve pre-existing preload (time)" "$EXPECTED" "$ACTUAL" GIT_VER="$(git describe --tags --always --dirty=-modified 2>/dev/null || echo dev-nogit)" -DEBUG_STR="$(./fakehostname -v | fgrep -q '[debug enabled]' && echo ' [debug enabled]')" +DEBUG_STR="$(./fakehostname -v | grep -Fq '[debug enabled]' && echo ' [debug enabled]')" EXPECTED="fakehostname version: ${GIT_VER}${DEBUG_STR}|libfakehostname version: ${GIT_VER}${DEBUG_STR} (./libfakehostname.$LIB_SUFFIX)" ACTUAL="$(./fakehostname -v | strip_newlines)" run_test "version check" "$EXPECTED" "$ACTUAL" diff --git a/extras/time_preload.c b/extras/time_preload.c index f6ca2f0..19af86c 100644 --- a/extras/time_preload.c +++ b/extras/time_preload.c @@ -2,7 +2,7 @@ #include #include -#include "../src/common.h" +#include "../src/fakehostname.h" #ifdef ENABLE_DEBUG diff --git a/src/fakehostname.c b/src/fakehostname.c index 04b7e4d..630f653 100644 --- a/src/fakehostname.c +++ b/src/fakehostname.c @@ -12,7 +12,7 @@ #endif #include -#include "common.h" +#include "fakehostname.h" static char *custom_lib_path = NULL; static char *new_hostname; diff --git a/src/common.h b/src/fakehostname.h similarity index 96% rename from src/common.h rename to src/fakehostname.h index 6723854..17f17db 100644 --- a/src/common.h +++ b/src/fakehostname.h @@ -1,5 +1,5 @@ -#ifndef FAKEHOSTNAME_COMMON_H_ - #define FAKEHOSTNAME_COMMON_H_ +#ifndef FAKEHOSTNAME_H_ + #define FAKEHOSTNAME_H_ // Apple or Linux configuration #ifdef __APPLE__ diff --git a/src/libfakehostname.c b/src/libfakehostname.c index 90826ad..52dc19b 100644 --- a/src/libfakehostname.c +++ b/src/libfakehostname.c @@ -6,7 +6,7 @@ #include #include -#include "common.h" +#include "fakehostname.h" static int (*__orig_gethostname)(char *name, size_t len) = NULL; static int (*__orig_uname)(struct utsname *buf) = NULL;