diff --git a/dhcp.spec b/dhcp.spec index 3488b766267593a8c8b84dd52c29fef4c562aaca..6b050e2abfd6f8c9f81bdc7fd30ab80d9cec7340 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: 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 - 12:4.4.3-7 +- Type:enhancement +- 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/support-for-building-with-clang.patch b/support-for-building-with-clang.patch new file mode 100644 index 0000000000000000000000000000000000000000..3845aef0f16d69e726716beac06ced5ae747daa1 --- /dev/null +++ b/support-for-building-with-clang.patch @@ -0,0 +1,29 @@ +From eb6f6bd959c2f496e4db1a90ea0629bbf9b12185 Mon Sep 17 00:00:00 2001 +From: cf-zhao +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 +