Support for building with clang
(cherry picked from commit 7ce0ef67864e58e40a1d7ac399e8228444bdbd3c)
This commit is contained in:
parent
739fddc7cb
commit
f1dd26a78a
@ -3,7 +3,7 @@
|
||||
|
||||
Name: dhcp
|
||||
Version: 4.4.3
|
||||
Release: 6
|
||||
Release: 7
|
||||
Summary: Dynamic host configuration protocol software
|
||||
#Please don't change the epoch on this package
|
||||
Epoch: 12
|
||||
@ -61,6 +61,7 @@ Patch42: backport-CVE-2022-2795.patch
|
||||
Patch43: backport-CVE-2022-38177.patch
|
||||
Patch44: backport-CVE-2022-38178.patch
|
||||
Patch45: IAID-is-output-has-hexe-if-it-contains-or.patch
|
||||
Patch46: support-for-building-with-clang.patch
|
||||
|
||||
BuildRequires: gcc autoconf automake libtool openldap-devel krb5-devel libcap-ng-devel
|
||||
BuildRequires: systemd systemd-devel
|
||||
@ -309,6 +310,12 @@ exit 0
|
||||
%{_mandir}/man3/omapi.3.gz
|
||||
|
||||
%changelog
|
||||
* Thu Mar 20 cf-zhao <zhaochuanfeng@huawei.com> - 12:4.4.3-7
|
||||
- Type:enhancement
|
||||
- ID:NA
|
||||
- SUG:build with clang
|
||||
- DESC:Support for building with clang
|
||||
|
||||
* Sat Jan 20 2024 renmingshuai <renmingshuai@huawei.com> - 12:4.4.3-6
|
||||
- Type:bugfix
|
||||
- ID:
|
||||
|
||||
29
support-for-building-with-clang.patch
Normal file
29
support-for-building-with-clang.patch
Normal file
@ -0,0 +1,29 @@
|
||||
From eb6f6bd959c2f496e4db1a90ea0629bbf9b12185 Mon Sep 17 00:00:00 2001
|
||||
From: cf-zhao <zhaochuanfeng@huawei.com>
|
||||
Date: Thu, 21 Mar 2024 13:04:26 +0800
|
||||
Subject: [PATCH] Support for building with clang
|
||||
|
||||
---
|
||||
client/dhclient.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/client/dhclient.c b/client/dhclient.c
|
||||
index 3e31dbf..a1f8849 100644
|
||||
--- a/client/dhclient.c
|
||||
+++ b/client/dhclient.c
|
||||
@@ -48,7 +48,12 @@
|
||||
/*
|
||||
* Defined in stdio.h when _GNU_SOURCE is set, but we don't want to define
|
||||
* that when building ISC code.
|
||||
+ * When build with clang, there is also a macro defined in stdio2.h,
|
||||
+ * undefine it so that we still use the prototype in stdio.h.
|
||||
*/
|
||||
+#ifdef asprintf
|
||||
+#undef asprintf
|
||||
+#endif
|
||||
extern int asprintf(char **strp, const char *fmt, ...);
|
||||
|
||||
TIME default_lease_time = 43200; /* 12 hours... */
|
||||
--
|
||||
2.33.0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user