From 8cc0fedefbf1362d3a3ab0494a319afa5233d69b Mon Sep 17 00:00:00 2001 From: Nicolas Lorin Date: Fri, 5 Aug 2022 08:52:03 +0200 Subject: [PATCH] kpatch-build: use err.h instead of error.h for musl support --- kpatch-build/create-diff-object.c | 4 ++-- kpatch-build/kpatch-elf.c | 2 +- kpatch-build/log.h | 4 ++-- kpatch-build/lookup.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/kpatch-build/create-diff-object.c b/kpatch-build/create-diff-object.c index d3e873e..918d21c 100644 --- a/kpatch-build/create-diff-object.c +++ b/kpatch-build/create-diff-object.c @@ -40,7 +40,7 @@ #include #include #include -#include +#include #include #include #include @@ -56,7 +56,7 @@ #define DIFF_FATAL(format, ...) \ ({ \ fprintf(stderr, "ERROR: %s: " format "\n", childobj, ##__VA_ARGS__); \ - error(EXIT_STATUS_DIFF_FATAL, 0, "unreconcilable difference"); \ + err(EXIT_STATUS_DIFF_FATAL, "unreconcilable difference"); \ }) char *childobj; diff --git a/kpatch-build/kpatch-elf.c b/kpatch-build/kpatch-elf.c index 92881e9..58dbe1a 100644 --- a/kpatch-build/kpatch-elf.c +++ b/kpatch-build/kpatch-elf.c @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include diff --git a/kpatch-build/log.h b/kpatch-build/log.h index ae54175..eefa0fc 100644 --- a/kpatch-build/log.h +++ b/kpatch-build/log.h @@ -1,7 +1,7 @@ #ifndef _LOG_H_ #define _LOG_H_ -#include +#include #include "kpatch.h" /* Files that include log.h must define loglevel and childobj */ @@ -9,7 +9,7 @@ extern enum loglevel loglevel; extern char *childobj; #define ERROR(format, ...) \ - error(EXIT_STATUS_ERROR, 0, "ERROR: %s: %s: %d: " format, childobj, __FUNCTION__, __LINE__, ##__VA_ARGS__) + err(EXIT_STATUS_ERROR, "ERROR: %s: %s: %d: " format, childobj, __FUNCTION__, __LINE__, ##__VA_ARGS__) #define log_debug(format, ...) log(DEBUG, format, ##__VA_ARGS__) #define log_normal(format, ...) log(NORMAL, "%s: " format, childobj, ##__VA_ARGS__) diff --git a/kpatch-build/lookup.c b/kpatch-build/lookup.c index c9e6cc7..f2596b1 100644 --- a/kpatch-build/lookup.c +++ b/kpatch-build/lookup.c @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include