From d62fb0a413408e23a53b02d0860ec25e186079bc Mon Sep 17 00:00:00 2001 From: luofeng14 Date: Sun, 4 Feb 2024 08:34:11 +0000 Subject: [PATCH] Support for building with clang Signed-off-by: luofeng14 --- dhcp.spec | 9 ++++++- huawei-support-for-building-with-clang.patch | 26 ++++++++++++++++++++ 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 huawei-support-for-building-with-clang.patch diff --git a/dhcp.spec b/dhcp.spec index 3488b76..2d2cc45 100644 --- a/dhcp.spec +++ b/dhcp.spec @@ -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: huawei-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 +* Mon Nov 13 cf-zhao - 12:4.4.3-7 +- Type:requirement +- ID:NA +- SUG:build with clang +- DESC:Support for building with clang + * Sat Jan 20 2024 renmingshuai - 12:4.4.3-6 - Type:bugfix - ID: diff --git a/huawei-support-for-building-with-clang.patch b/huawei-support-for-building-with-clang.patch new file mode 100644 index 0000000..feb74de --- /dev/null +++ b/huawei-support-for-building-with-clang.patch @@ -0,0 +1,26 @@ +From 2d9a110b66422fd9185a1e3ea7376c23236633a2 Mon Sep 17 00:00:00 2001 +From: y00428059 +Date: Wed, 15 Nov 2023 13:16:31 +0800 +Subject: [PATCH] support for building with clang + +--- + client/dhclient.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/client/dhclient.c b/client/dhclient.c +index a3fe1ae..517b9cf 100644 +--- a/client/dhclient.c ++++ b/client/dhclient.c +@@ -49,7 +49,9 @@ + * Defined in stdio.h when _GNU_SOURCE is set, but we don't want to define + * that when building ISC code. + */ ++#ifndef asprintf + extern int asprintf(char **strp, const char *fmt, ...); ++#endif + + TIME default_lease_time = 43200; /* 12 hours... */ + TIME max_lease_time = 86400; /* 24 hours... */ +-- +2.19.1 + -- Gitee