aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2023-03-02 21:30:20 +0000
committerElliott Hughes <enh@google.com>2023-03-02 21:30:20 +0000
commit564f652e4d5b49b85ab30c0b362d3f74c7fb4456 (patch)
tree0979e02c45eed847b1157656428839e6e857d8b0
parent1120a0ccc065ab6bbe77803032526b75a74d5c46 (diff)
downloadiproute2-564f652e4d5b49b85ab30c0b362d3f74c7fb4456.tar.gz
Enable strdupa() for this project, build ip_bond*.c.
We don't want to _encourage_ strdupa(), so we've never added it to bionic, but it's a trivial -D in cflags for anyone who wants it for glibc code. I've added it to the top-level .bp file so that any future uses in this project will "just work". Bug: http://b/271183179 Test: treehugger Change-Id: Ib6750d1266fd6030958662ecec591f6d708915a6
-rw-r--r--Android.bp2
-rw-r--r--ip/Android.bp2
2 files changed, 4 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
index b4c5cf5e..c9c79304 100644
--- a/Android.bp
+++ b/Android.bp
@@ -85,5 +85,7 @@ cc_defaults {
"-DHAVE_UTIME_H",
"-DNO_SHARED_LIBS",
+
+ "-Dstrdupa(__S)=strcpy(alloca(strlen(__S) + 1), __S)",
],
}
diff --git a/ip/Android.bp b/ip/Android.bp
index 25a44677..b40fc4a0 100644
--- a/ip/Android.bp
+++ b/ip/Android.bp
@@ -43,6 +43,8 @@ cc_binary {
"ipfou.c",
"ipila.c",
"ipl2tp.c",
+ "iplink_bond.c",
+ "iplink_bond_slave.c",
"iplink_bridge.c",
"iplink_bridge_slave.c",
"iplink.c",