30 lines
831 B
Diff
30 lines
831 B
Diff
|
|
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
|
||
|
|
|