lvm2/0035-fix-function-undeclared-in-libdm-common.c-and-dev-cache.c.patch
fandeyuan 903e05c02c fix function undeclared in libdm-common.c and dev-cache.c,support clang
(cherry picked from commit 570d83d90469f2cdc622e207c782ee6165562456)
2024-11-07 18:01:06 +08:00

38 lines
983 B
Diff

From 575e88c4591efe7783d00445880269c17e9db579 Mon Sep 17 00:00:00 2001
From: yuncang123 <1050706328@qq.com>
Date: Sat, 7 Sep 2024 18:34:09 +0800
Subject: [PATCH] fix function undeclared in libdm-common.c and dev-cache.c,support clang
---
lib/device/dev-cache.c | 1 +
libdm/libdm-common.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/lib/device/dev-cache.c b/lib/device/dev-cache.c
index f565179..87b3bc3 100644
--- a/lib/device/dev-cache.c
+++ b/lib/device/dev-cache.c
@@ -31,6 +31,7 @@
#include <locale.h>
/* coverity[unnecessary_header] needed for MuslC */
#include <sys/file.h>
+#include <sys/time.h>
struct dev_iter {
struct btree_iter *current;
diff --git a/libdm/libdm-common.c b/libdm/libdm-common.c
index dcc9e40..d219e1e 100644
--- a/libdm/libdm-common.c
+++ b/libdm/libdm-common.c
@@ -24,6 +24,7 @@
#include <sys/ioctl.h>
#include <fcntl.h>
#include <dirent.h>
+#include <syslog.h>
#ifdef UDEV_SYNC_SUPPORT
# include <sys/types.h>
--
2.43.0