diff options
author | Khem Raj <raj.khem@gmail.com> | 2023-11-29 22:10:24 -0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2023-11-29 22:19:11 -0800 |
commit | e1eafe6d9b83ab856c4f30bb0fd92ff537a044ce (patch) | |
tree | 775334d17d4bc3c509d898bd417940af20ff34d2 | |
parent | 41f16dc063f3aea57f3cba2d780d0327676d1e15 (diff) | |
download | meta-openembedded-e1eafe6d9b83ab856c4f30bb0fd92ff537a044ce.tar.gz |
sdbus-c++-libsystemd: Upgrade to 254
Signed-off-by: Khem Raj <raj.khem@gmail.com>
34 files changed, 948 insertions, 992 deletions
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0001-Adjust-for-musl-headers.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0001-Adjust-for-musl-headers.patch index 2363679c9..5e9646c56 100644 --- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0001-Adjust-for-musl-headers.patch +++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0001-Adjust-for-musl-headers.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 4c2e932664ec67662f4a0306cca4a7cd82853bda Mon Sep 17 00:00:00 2001 | 1 | From e5f067cb3dc845dd865e450f4e64077b28feb4c0 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Fri, 21 Jan 2022 22:19:37 -0800 | 3 | Date: Fri, 21 Jan 2022 22:19:37 -0800 |
4 | Subject: [PATCH] Adjust for musl headers | 4 | Subject: [PATCH] Adjust for musl headers |
@@ -29,20 +29,25 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
29 | src/network/netdev/vrf.c | 2 +- | 29 | src/network/netdev/vrf.c | 2 +- |
30 | src/network/netdev/vxcan.c | 2 +- | 30 | src/network/netdev/vxcan.c | 2 +- |
31 | src/network/netdev/vxlan.c | 2 +- | 31 | src/network/netdev/vxlan.c | 2 +- |
32 | src/network/netdev/wireguard.c | 2 +- | ||
32 | src/network/netdev/xfrm.c | 2 +- | 33 | src/network/netdev/xfrm.c | 2 +- |
33 | src/network/networkd-bridge-mdb.c | 4 ++-- | 34 | src/network/networkd-bridge-mdb.c | 4 ++-- |
34 | src/network/networkd-dhcp-common.c | 3 ++- | 35 | src/network/networkd-dhcp-common.c | 3 ++- |
35 | src/network/networkd-dhcp-prefix-delegation.c | 4 ++-- | 36 | src/network/networkd-dhcp-prefix-delegation.c | 4 ++-- |
36 | src/network/networkd-dhcp-server.c | 2 +- | 37 | src/network/networkd-dhcp-server.c | 2 +- |
37 | src/network/networkd-dhcp4.c | 2 +- | 38 | src/network/networkd-dhcp4.c | 2 +- |
39 | src/network/networkd-ipv6ll.c | 2 +- | ||
38 | src/network/networkd-link.c | 2 +- | 40 | src/network/networkd-link.c | 2 +- |
41 | src/network/networkd-ndisc.c | 2 +- | ||
39 | src/network/networkd-route.c | 8 ++++---- | 42 | src/network/networkd-route.c | 8 ++++---- |
40 | src/network/networkd-setlink.c | 2 +- | 43 | src/network/networkd-setlink.c | 2 +- |
41 | src/shared/linux/ethtool.h | 3 ++- | 44 | src/shared/linux/ethtool.h | 3 ++- |
42 | src/shared/netif-util.c | 2 +- | 45 | src/shared/netif-util.c | 2 +- |
43 | src/udev/udev-builtin-net_id.c | 2 +- | 46 | src/udev/udev-builtin-net_id.c | 2 +- |
44 | 34 files changed, 41 insertions(+), 39 deletions(-) | 47 | 37 files changed, 44 insertions(+), 42 deletions(-) |
45 | 48 | ||
49 | diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c | ||
50 | index 57dd91f81f..2b7f4fa3a7 100644 | ||
46 | --- a/src/libsystemd-network/sd-dhcp6-client.c | 51 | --- a/src/libsystemd-network/sd-dhcp6-client.c |
47 | +++ b/src/libsystemd-network/sd-dhcp6-client.c | 52 | +++ b/src/libsystemd-network/sd-dhcp6-client.c |
48 | @@ -5,7 +5,7 @@ | 53 | @@ -5,7 +5,7 @@ |
@@ -54,6 +59,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
54 | #include <linux/if_infiniband.h> | 59 | #include <linux/if_infiniband.h> |
55 | 60 | ||
56 | #include "sd-dhcp6-client.h" | 61 | #include "sd-dhcp6-client.h" |
62 | diff --git a/src/network/netdev/bareudp.c b/src/network/netdev/bareudp.c | ||
63 | index 24d3afb877..f6241b41ee 100644 | ||
57 | --- a/src/network/netdev/bareudp.c | 64 | --- a/src/network/netdev/bareudp.c |
58 | +++ b/src/network/netdev/bareudp.c | 65 | +++ b/src/network/netdev/bareudp.c |
59 | @@ -2,7 +2,7 @@ | 66 | @@ -2,7 +2,7 @@ |
@@ -65,6 +72,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
65 | 72 | ||
66 | #include "bareudp.h" | 73 | #include "bareudp.h" |
67 | #include "netlink-util.h" | 74 | #include "netlink-util.h" |
75 | diff --git a/src/network/netdev/batadv.c b/src/network/netdev/batadv.c | ||
76 | index 7e97619657..50fcffcfdf 100644 | ||
68 | --- a/src/network/netdev/batadv.c | 77 | --- a/src/network/netdev/batadv.c |
69 | +++ b/src/network/netdev/batadv.c | 78 | +++ b/src/network/netdev/batadv.c |
70 | @@ -3,7 +3,7 @@ | 79 | @@ -3,7 +3,7 @@ |
@@ -76,6 +85,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
76 | 85 | ||
77 | #include "batadv.h" | 86 | #include "batadv.h" |
78 | #include "fileio.h" | 87 | #include "fileio.h" |
88 | diff --git a/src/network/netdev/bond.c b/src/network/netdev/bond.c | ||
89 | index 601bff0a9c..dfed8d9e54 100644 | ||
79 | --- a/src/network/netdev/bond.c | 90 | --- a/src/network/netdev/bond.c |
80 | +++ b/src/network/netdev/bond.c | 91 | +++ b/src/network/netdev/bond.c |
81 | @@ -1,7 +1,7 @@ | 92 | @@ -1,7 +1,7 @@ |
@@ -87,6 +98,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
87 | 98 | ||
88 | #include "alloc-util.h" | 99 | #include "alloc-util.h" |
89 | #include "bond.h" | 100 | #include "bond.h" |
101 | diff --git a/src/network/netdev/bridge.c b/src/network/netdev/bridge.c | ||
102 | index b65c3b49fc..6875b4fbdb 100644 | ||
90 | --- a/src/network/netdev/bridge.c | 103 | --- a/src/network/netdev/bridge.c |
91 | +++ b/src/network/netdev/bridge.c | 104 | +++ b/src/network/netdev/bridge.c |
92 | @@ -2,7 +2,7 @@ | 105 | @@ -2,7 +2,7 @@ |
@@ -98,6 +111,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
98 | #include <linux/if_bridge.h> | 111 | #include <linux/if_bridge.h> |
99 | 112 | ||
100 | #include "bridge.h" | 113 | #include "bridge.h" |
114 | diff --git a/src/network/netdev/dummy.c b/src/network/netdev/dummy.c | ||
115 | index 00df1d2787..77b506b422 100644 | ||
101 | --- a/src/network/netdev/dummy.c | 116 | --- a/src/network/netdev/dummy.c |
102 | +++ b/src/network/netdev/dummy.c | 117 | +++ b/src/network/netdev/dummy.c |
103 | @@ -1,6 +1,6 @@ | 118 | @@ -1,6 +1,6 @@ |
@@ -108,6 +123,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
108 | 123 | ||
109 | #include "dummy.h" | 124 | #include "dummy.h" |
110 | 125 | ||
126 | diff --git a/src/network/netdev/geneve.c b/src/network/netdev/geneve.c | ||
127 | index 777a32d75c..73bfa2b5c1 100644 | ||
111 | --- a/src/network/netdev/geneve.c | 128 | --- a/src/network/netdev/geneve.c |
112 | +++ b/src/network/netdev/geneve.c | 129 | +++ b/src/network/netdev/geneve.c |
113 | @@ -2,7 +2,7 @@ | 130 | @@ -2,7 +2,7 @@ |
@@ -119,6 +136,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
119 | 136 | ||
120 | #include "alloc-util.h" | 137 | #include "alloc-util.h" |
121 | #include "conf-parser.h" | 138 | #include "conf-parser.h" |
139 | diff --git a/src/network/netdev/ifb.c b/src/network/netdev/ifb.c | ||
140 | index d7ff44cb9e..e037629ae4 100644 | ||
122 | --- a/src/network/netdev/ifb.c | 141 | --- a/src/network/netdev/ifb.c |
123 | +++ b/src/network/netdev/ifb.c | 142 | +++ b/src/network/netdev/ifb.c |
124 | @@ -1,7 +1,7 @@ | 143 | @@ -1,7 +1,7 @@ |
@@ -130,6 +149,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
130 | 149 | ||
131 | #include "ifb.h" | 150 | #include "ifb.h" |
132 | 151 | ||
152 | diff --git a/src/network/netdev/ipoib.c b/src/network/netdev/ipoib.c | ||
153 | index 5dd9286d57..4036d66dad 100644 | ||
133 | --- a/src/network/netdev/ipoib.c | 154 | --- a/src/network/netdev/ipoib.c |
134 | +++ b/src/network/netdev/ipoib.c | 155 | +++ b/src/network/netdev/ipoib.c |
135 | @@ -1,6 +1,6 @@ | 156 | @@ -1,6 +1,6 @@ |
@@ -140,6 +161,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
140 | #include <linux/if_link.h> | 161 | #include <linux/if_link.h> |
141 | 162 | ||
142 | #include "ipoib.h" | 163 | #include "ipoib.h" |
164 | diff --git a/src/network/netdev/ipvlan.c b/src/network/netdev/ipvlan.c | ||
165 | index 058eadebd7..c470ebb6d7 100644 | ||
143 | --- a/src/network/netdev/ipvlan.c | 166 | --- a/src/network/netdev/ipvlan.c |
144 | +++ b/src/network/netdev/ipvlan.c | 167 | +++ b/src/network/netdev/ipvlan.c |
145 | @@ -2,7 +2,7 @@ | 168 | @@ -2,7 +2,7 @@ |
@@ -151,6 +174,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
151 | 174 | ||
152 | #include "conf-parser.h" | 175 | #include "conf-parser.h" |
153 | #include "ipvlan.h" | 176 | #include "ipvlan.h" |
177 | diff --git a/src/network/netdev/macsec.c b/src/network/netdev/macsec.c | ||
178 | index 0da3dd4bd2..eb20f04469 100644 | ||
154 | --- a/src/network/netdev/macsec.c | 179 | --- a/src/network/netdev/macsec.c |
155 | +++ b/src/network/netdev/macsec.c | 180 | +++ b/src/network/netdev/macsec.c |
156 | @@ -1,7 +1,7 @@ | 181 | @@ -1,7 +1,7 @@ |
@@ -162,6 +187,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
162 | #include <linux/if_ether.h> | 187 | #include <linux/if_ether.h> |
163 | #include <linux/if_macsec.h> | 188 | #include <linux/if_macsec.h> |
164 | #include <linux/genetlink.h> | 189 | #include <linux/genetlink.h> |
190 | diff --git a/src/network/netdev/macvlan.c b/src/network/netdev/macvlan.c | ||
191 | index 1114bb0cb1..6c79a219a4 100644 | ||
165 | --- a/src/network/netdev/macvlan.c | 192 | --- a/src/network/netdev/macvlan.c |
166 | +++ b/src/network/netdev/macvlan.c | 193 | +++ b/src/network/netdev/macvlan.c |
167 | @@ -2,7 +2,7 @@ | 194 | @@ -2,7 +2,7 @@ |
@@ -173,6 +200,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
173 | 200 | ||
174 | #include "conf-parser.h" | 201 | #include "conf-parser.h" |
175 | #include "macvlan.h" | 202 | #include "macvlan.h" |
203 | diff --git a/src/network/netdev/netdev.c b/src/network/netdev/netdev.c | ||
204 | index 038a27c118..67155f0db7 100644 | ||
176 | --- a/src/network/netdev/netdev.c | 205 | --- a/src/network/netdev/netdev.c |
177 | +++ b/src/network/netdev/netdev.c | 206 | +++ b/src/network/netdev/netdev.c |
178 | @@ -2,7 +2,7 @@ | 207 | @@ -2,7 +2,7 @@ |
@@ -184,6 +213,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
184 | #include <unistd.h> | 213 | #include <unistd.h> |
185 | 214 | ||
186 | #include "alloc-util.h" | 215 | #include "alloc-util.h" |
216 | diff --git a/src/network/netdev/netdevsim.c b/src/network/netdev/netdevsim.c | ||
217 | index 15d5c132f9..a3ffa48b15 100644 | ||
187 | --- a/src/network/netdev/netdevsim.c | 218 | --- a/src/network/netdev/netdevsim.c |
188 | +++ b/src/network/netdev/netdevsim.c | 219 | +++ b/src/network/netdev/netdevsim.c |
189 | @@ -1,6 +1,6 @@ | 220 | @@ -1,6 +1,6 @@ |
@@ -194,6 +225,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
194 | 225 | ||
195 | #include "netdevsim.h" | 226 | #include "netdevsim.h" |
196 | 227 | ||
228 | diff --git a/src/network/netdev/nlmon.c b/src/network/netdev/nlmon.c | ||
229 | index ff372092e6..eef66811f4 100644 | ||
197 | --- a/src/network/netdev/nlmon.c | 230 | --- a/src/network/netdev/nlmon.c |
198 | +++ b/src/network/netdev/nlmon.c | 231 | +++ b/src/network/netdev/nlmon.c |
199 | @@ -1,6 +1,6 @@ | 232 | @@ -1,6 +1,6 @@ |
@@ -204,6 +237,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
204 | 237 | ||
205 | #include "nlmon.h" | 238 | #include "nlmon.h" |
206 | 239 | ||
240 | diff --git a/src/network/netdev/tunnel.c b/src/network/netdev/tunnel.c | ||
241 | index 2addfeecaa..954987f26d 100644 | ||
207 | --- a/src/network/netdev/tunnel.c | 242 | --- a/src/network/netdev/tunnel.c |
208 | +++ b/src/network/netdev/tunnel.c | 243 | +++ b/src/network/netdev/tunnel.c |
209 | @@ -2,7 +2,7 @@ | 244 | @@ -2,7 +2,7 @@ |
@@ -215,6 +250,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
215 | #include <linux/if_tunnel.h> | 250 | #include <linux/if_tunnel.h> |
216 | #include <linux/ip.h> | 251 | #include <linux/ip.h> |
217 | #include <linux/ip6_tunnel.h> | 252 | #include <linux/ip6_tunnel.h> |
253 | diff --git a/src/network/netdev/vcan.c b/src/network/netdev/vcan.c | ||
254 | index 380547ee1e..137c1adf8a 100644 | ||
218 | --- a/src/network/netdev/vcan.c | 255 | --- a/src/network/netdev/vcan.c |
219 | +++ b/src/network/netdev/vcan.c | 256 | +++ b/src/network/netdev/vcan.c |
220 | @@ -1,6 +1,6 @@ | 257 | @@ -1,6 +1,6 @@ |
@@ -225,6 +262,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
225 | 262 | ||
226 | #include "vcan.h" | 263 | #include "vcan.h" |
227 | 264 | ||
265 | diff --git a/src/network/netdev/veth.c b/src/network/netdev/veth.c | ||
266 | index fb00e6667f..f52d9ee89a 100644 | ||
228 | --- a/src/network/netdev/veth.c | 267 | --- a/src/network/netdev/veth.c |
229 | +++ b/src/network/netdev/veth.c | 268 | +++ b/src/network/netdev/veth.c |
230 | @@ -3,7 +3,7 @@ | 269 | @@ -3,7 +3,7 @@ |
@@ -236,6 +275,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
236 | #include <linux/veth.h> | 275 | #include <linux/veth.h> |
237 | 276 | ||
238 | #include "netlink-util.h" | 277 | #include "netlink-util.h" |
278 | diff --git a/src/network/netdev/vlan.c b/src/network/netdev/vlan.c | ||
279 | index a3d961dac3..386b567a42 100644 | ||
239 | --- a/src/network/netdev/vlan.c | 280 | --- a/src/network/netdev/vlan.c |
240 | +++ b/src/network/netdev/vlan.c | 281 | +++ b/src/network/netdev/vlan.c |
241 | @@ -2,7 +2,7 @@ | 282 | @@ -2,7 +2,7 @@ |
@@ -247,6 +288,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
247 | #include <linux/if_vlan.h> | 288 | #include <linux/if_vlan.h> |
248 | 289 | ||
249 | #include "parse-util.h" | 290 | #include "parse-util.h" |
291 | diff --git a/src/network/netdev/vrf.c b/src/network/netdev/vrf.c | ||
292 | index 05ef3ff13d..825fc4a398 100644 | ||
250 | --- a/src/network/netdev/vrf.c | 293 | --- a/src/network/netdev/vrf.c |
251 | +++ b/src/network/netdev/vrf.c | 294 | +++ b/src/network/netdev/vrf.c |
252 | @@ -2,7 +2,7 @@ | 295 | @@ -2,7 +2,7 @@ |
@@ -258,6 +301,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
258 | 301 | ||
259 | #include "vrf.h" | 302 | #include "vrf.h" |
260 | 303 | ||
304 | diff --git a/src/network/netdev/vxcan.c b/src/network/netdev/vxcan.c | ||
305 | index 83269b0707..39c6dbe29c 100644 | ||
261 | --- a/src/network/netdev/vxcan.c | 306 | --- a/src/network/netdev/vxcan.c |
262 | +++ b/src/network/netdev/vxcan.c | 307 | +++ b/src/network/netdev/vxcan.c |
263 | @@ -1,7 +1,7 @@ | 308 | @@ -1,7 +1,7 @@ |
@@ -269,6 +314,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
269 | 314 | ||
270 | #include "vxcan.h" | 315 | #include "vxcan.h" |
271 | 316 | ||
317 | diff --git a/src/network/netdev/vxlan.c b/src/network/netdev/vxlan.c | ||
318 | index 589161938a..0ec9625b7a 100644 | ||
272 | --- a/src/network/netdev/vxlan.c | 319 | --- a/src/network/netdev/vxlan.c |
273 | +++ b/src/network/netdev/vxlan.c | 320 | +++ b/src/network/netdev/vxlan.c |
274 | @@ -2,7 +2,7 @@ | 321 | @@ -2,7 +2,7 @@ |
@@ -280,6 +327,21 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
280 | 327 | ||
281 | #include "conf-parser.h" | 328 | #include "conf-parser.h" |
282 | #include "alloc-util.h" | 329 | #include "alloc-util.h" |
330 | diff --git a/src/network/netdev/wireguard.c b/src/network/netdev/wireguard.c | ||
331 | index 51e7e02990..fc36c0623a 100644 | ||
332 | --- a/src/network/netdev/wireguard.c | ||
333 | +++ b/src/network/netdev/wireguard.c | ||
334 | @@ -6,7 +6,7 @@ | ||
335 | #include <sys/ioctl.h> | ||
336 | #include <net/if.h> | ||
337 | #include <netinet/in.h> | ||
338 | -#include <linux/if_arp.h> | ||
339 | +//#include <linux/if_arp.h> | ||
340 | #include <linux/ipv6_route.h> | ||
341 | |||
342 | #include "sd-resolve.h" | ||
343 | diff --git a/src/network/netdev/xfrm.c b/src/network/netdev/xfrm.c | ||
344 | index a961d8fef2..6c1815b257 100644 | ||
283 | --- a/src/network/netdev/xfrm.c | 345 | --- a/src/network/netdev/xfrm.c |
284 | +++ b/src/network/netdev/xfrm.c | 346 | +++ b/src/network/netdev/xfrm.c |
285 | @@ -1,6 +1,6 @@ | 347 | @@ -1,6 +1,6 @@ |
@@ -290,6 +352,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
290 | 352 | ||
291 | #include "missing_network.h" | 353 | #include "missing_network.h" |
292 | #include "xfrm.h" | 354 | #include "xfrm.h" |
355 | diff --git a/src/network/networkd-bridge-mdb.c b/src/network/networkd-bridge-mdb.c | ||
356 | index bd1a9745dc..949d3da029 100644 | ||
293 | --- a/src/network/networkd-bridge-mdb.c | 357 | --- a/src/network/networkd-bridge-mdb.c |
294 | +++ b/src/network/networkd-bridge-mdb.c | 358 | +++ b/src/network/networkd-bridge-mdb.c |
295 | @@ -1,7 +1,5 @@ | 359 | @@ -1,7 +1,5 @@ |
@@ -309,6 +373,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
309 | 373 | ||
310 | #define STATIC_BRIDGE_MDB_ENTRIES_PER_NETWORK_MAX 1024U | 374 | #define STATIC_BRIDGE_MDB_ENTRIES_PER_NETWORK_MAX 1024U |
311 | 375 | ||
376 | diff --git a/src/network/networkd-dhcp-common.c b/src/network/networkd-dhcp-common.c | ||
377 | index ca9a825e7b..8735e261ad 100644 | ||
312 | --- a/src/network/networkd-dhcp-common.c | 378 | --- a/src/network/networkd-dhcp-common.c |
313 | +++ b/src/network/networkd-dhcp-common.c | 379 | +++ b/src/network/networkd-dhcp-common.c |
314 | @@ -1,7 +1,8 @@ | 380 | @@ -1,7 +1,8 @@ |
@@ -320,7 +386,9 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
320 | +#include <net/if.h> | 386 | +#include <net/if.h> |
321 | 387 | ||
322 | #include "bus-error.h" | 388 | #include "bus-error.h" |
323 | #include "dhcp-identifier.h" | 389 | #include "bus-locator.h" |
390 | diff --git a/src/network/networkd-dhcp-prefix-delegation.c b/src/network/networkd-dhcp-prefix-delegation.c | ||
391 | index 66c5e979d9..581b6b8c29 100644 | ||
324 | --- a/src/network/networkd-dhcp-prefix-delegation.c | 392 | --- a/src/network/networkd-dhcp-prefix-delegation.c |
325 | +++ b/src/network/networkd-dhcp-prefix-delegation.c | 393 | +++ b/src/network/networkd-dhcp-prefix-delegation.c |
326 | @@ -1,7 +1,5 @@ | 394 | @@ -1,7 +1,5 @@ |
@@ -340,6 +408,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
340 | bool link_dhcp_pd_is_enabled(Link *link) { | 408 | bool link_dhcp_pd_is_enabled(Link *link) { |
341 | assert(link); | 409 | assert(link); |
342 | 410 | ||
411 | diff --git a/src/network/networkd-dhcp-server.c b/src/network/networkd-dhcp-server.c | ||
412 | index 620fbbddc7..c8af20fb34 100644 | ||
343 | --- a/src/network/networkd-dhcp-server.c | 413 | --- a/src/network/networkd-dhcp-server.c |
344 | +++ b/src/network/networkd-dhcp-server.c | 414 | +++ b/src/network/networkd-dhcp-server.c |
345 | @@ -1,7 +1,7 @@ | 415 | @@ -1,7 +1,7 @@ |
@@ -351,6 +421,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
351 | #include <linux/if.h> | 421 | #include <linux/if.h> |
352 | 422 | ||
353 | #include "sd-dhcp-server.h" | 423 | #include "sd-dhcp-server.h" |
424 | diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c | ||
425 | index d4b4942173..3d78da5609 100644 | ||
354 | --- a/src/network/networkd-dhcp4.c | 426 | --- a/src/network/networkd-dhcp4.c |
355 | +++ b/src/network/networkd-dhcp4.c | 427 | +++ b/src/network/networkd-dhcp4.c |
356 | @@ -3,7 +3,7 @@ | 428 | @@ -3,7 +3,7 @@ |
@@ -362,6 +434,21 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
362 | 434 | ||
363 | #include "alloc-util.h" | 435 | #include "alloc-util.h" |
364 | #include "dhcp-client-internal.h" | 436 | #include "dhcp-client-internal.h" |
437 | diff --git a/src/network/networkd-ipv6ll.c b/src/network/networkd-ipv6ll.c | ||
438 | index 32229a3fc7..662a345d6e 100644 | ||
439 | --- a/src/network/networkd-ipv6ll.c | ||
440 | +++ b/src/network/networkd-ipv6ll.c | ||
441 | @@ -1,7 +1,7 @@ | ||
442 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
443 | |||
444 | #include <linux/if.h> | ||
445 | -#include <linux/if_arp.h> | ||
446 | +//#include <linux/if_arp.h> | ||
447 | |||
448 | #include "in-addr-util.h" | ||
449 | #include "networkd-address.h" | ||
450 | diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c | ||
451 | index 019bef0590..657fc41ae6 100644 | ||
365 | --- a/src/network/networkd-link.c | 452 | --- a/src/network/networkd-link.c |
366 | +++ b/src/network/networkd-link.c | 453 | +++ b/src/network/networkd-link.c |
367 | @@ -3,7 +3,7 @@ | 454 | @@ -3,7 +3,7 @@ |
@@ -373,6 +460,21 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
373 | #include <linux/if_link.h> | 460 | #include <linux/if_link.h> |
374 | #include <linux/netdevice.h> | 461 | #include <linux/netdevice.h> |
375 | #include <sys/socket.h> | 462 | #include <sys/socket.h> |
463 | diff --git a/src/network/networkd-ndisc.c b/src/network/networkd-ndisc.c | ||
464 | index 99a07e16fc..e51cd81d96 100644 | ||
465 | --- a/src/network/networkd-ndisc.c | ||
466 | +++ b/src/network/networkd-ndisc.c | ||
467 | @@ -6,7 +6,7 @@ | ||
468 | #include <arpa/inet.h> | ||
469 | #include <netinet/icmp6.h> | ||
470 | #include <linux/if.h> | ||
471 | -#include <linux/if_arp.h> | ||
472 | +//#include <linux/if_arp.h> | ||
473 | |||
474 | #include "sd-ndisc.h" | ||
475 | |||
476 | diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c | ||
477 | index 5214a8ad2c..9dd758daae 100644 | ||
376 | --- a/src/network/networkd-route.c | 478 | --- a/src/network/networkd-route.c |
377 | +++ b/src/network/networkd-route.c | 479 | +++ b/src/network/networkd-route.c |
378 | @@ -1,9 +1,5 @@ | 480 | @@ -1,9 +1,5 @@ |
@@ -396,6 +498,8 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
396 | int route_new(Route **ret) { | 498 | int route_new(Route **ret) { |
397 | _cleanup_(route_freep) Route *route = NULL; | 499 | _cleanup_(route_freep) Route *route = NULL; |
398 | 500 | ||
501 | diff --git a/src/network/networkd-setlink.c b/src/network/networkd-setlink.c | ||
502 | index 541c4b8a72..06ebda8f0f 100644 | ||
399 | --- a/src/network/networkd-setlink.c | 503 | --- a/src/network/networkd-setlink.c |
400 | +++ b/src/network/networkd-setlink.c | 504 | +++ b/src/network/networkd-setlink.c |
401 | @@ -2,7 +2,7 @@ | 505 | @@ -2,7 +2,7 @@ |
@@ -407,28 +511,35 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
407 | #include <linux/if_bridge.h> | 511 | #include <linux/if_bridge.h> |
408 | 512 | ||
409 | #include "missing_network.h" | 513 | #include "missing_network.h" |
514 | diff --git a/src/shared/linux/ethtool.h b/src/shared/linux/ethtool.h | ||
515 | index 1458de3627..d5c2d2e0ac 100644 | ||
410 | --- a/src/shared/linux/ethtool.h | 516 | --- a/src/shared/linux/ethtool.h |
411 | +++ b/src/shared/linux/ethtool.h | 517 | +++ b/src/shared/linux/ethtool.h |
412 | @@ -16,7 +16,8 @@ | 518 | @@ -16,7 +16,8 @@ |
413 | 519 | ||
414 | #include <linux/kernel.h> | 520 | #include <linux/const.h> |
415 | #include <linux/types.h> | 521 | #include <linux/types.h> |
416 | -#include <linux/if_ether.h> | 522 | -#include <linux/if_ether.h> |
417 | +#include <netinet/if_ether.h> | 523 | +#include <netinet/if_ether.h> |
418 | +//#include <linux/if_ether.h> | 524 | +//#include <linux/if_ether.h> |
419 | 525 | ||
420 | #ifndef __KERNEL__ | ||
421 | #include <limits.h> /* for INT_MAX */ | 526 | #include <limits.h> /* for INT_MAX */ |
527 | |||
528 | diff --git a/src/shared/netif-util.c b/src/shared/netif-util.c | ||
529 | index f56c5646c1..5af28ff119 100644 | ||
422 | --- a/src/shared/netif-util.c | 530 | --- a/src/shared/netif-util.c |
423 | +++ b/src/shared/netif-util.c | 531 | +++ b/src/shared/netif-util.c |
424 | @@ -1,6 +1,6 @@ | 532 | @@ -1,7 +1,7 @@ |
425 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | 533 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
426 | 534 | ||
535 | #include <linux/if.h> | ||
427 | -#include <linux/if_arp.h> | 536 | -#include <linux/if_arp.h> |
428 | +//#include <linux/if_arp.h> | 537 | +//#include <linux/if_arp.h> |
429 | 538 | ||
430 | #include "arphrd-util.h" | 539 | #include "arphrd-util.h" |
431 | #include "device-util.h" | 540 | #include "device-util.h" |
541 | diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c | ||
542 | index a48d5dedf8..31a8bc1b3c 100644 | ||
432 | --- a/src/udev/udev-builtin-net_id.c | 543 | --- a/src/udev/udev-builtin-net_id.c |
433 | +++ b/src/udev/udev-builtin-net_id.c | 544 | +++ b/src/udev/udev-builtin-net_id.c |
434 | @@ -18,7 +18,7 @@ | 545 | @@ -18,7 +18,7 @@ |
@@ -440,14 +551,6 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
440 | #include <linux/netdevice.h> | 551 | #include <linux/netdevice.h> |
441 | #include <linux/pci_regs.h> | 552 | #include <linux/pci_regs.h> |
442 | 553 | ||
443 | --- a/src/network/netdev/wireguard.c | 554 | -- |
444 | +++ b/src/network/netdev/wireguard.c | 555 | 2.39.2 |
445 | @@ -6,7 +6,7 @@ | 556 | |
446 | #include <sys/ioctl.h> | ||
447 | #include <net/if.h> | ||
448 | #include <netinet/in.h> | ||
449 | -#include <linux/if_arp.h> | ||
450 | +//#include <linux/if_arp.h> | ||
451 | #include <linux/ipv6_route.h> | ||
452 | |||
453 | #include "sd-resolve.h" | ||
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0001-dirent-util-Remove-asserts-on-dirent64-dirent.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0001-dirent-util-Remove-asserts-on-dirent64-dirent.patch deleted file mode 100644 index 517886c72..000000000 --- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0001-dirent-util-Remove-asserts-on-dirent64-dirent.patch +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | From 19cc68d4a89b59889be442d2997ff030cdc3de73 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 20 Dec 2022 20:11:17 -0800 | ||
4 | Subject: [PATCH] dirent-util: Remove asserts on dirent64 == dirent | ||
5 | |||
6 | We already have assert_cc(_FILE_OFFSET_BITS == 64) which ensures that 64bit LFS functions are same as their original counterparts | ||
7 | |||
8 | Upstream-Status: Submitted [https://github.com/systemd/systemd/pull/25809] | ||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | src/basic/dirent-util.h | 11 ----------- | ||
12 | 1 file changed, 11 deletions(-) | ||
13 | |||
14 | diff --git a/src/basic/dirent-util.h b/src/basic/dirent-util.h | ||
15 | index 04bc53003f..4cb317184d 100644 | ||
16 | --- a/src/basic/dirent-util.h | ||
17 | +++ b/src/basic/dirent-util.h | ||
18 | @@ -35,17 +35,6 @@ struct dirent *readdir_no_dot(DIR *dirp); | ||
19 | /* Only if 64bit off_t is enabled struct dirent + struct dirent64 are actually the same. We require this, and | ||
20 | * we want them to be interchangeable to make getdents64() work, hence verify that. */ | ||
21 | assert_cc(_FILE_OFFSET_BITS == 64); | ||
22 | -assert_cc(sizeof(struct dirent) == sizeof(struct dirent64)); | ||
23 | -assert_cc(offsetof(struct dirent, d_ino) == offsetof(struct dirent64, d_ino)); | ||
24 | -assert_cc(sizeof_field(struct dirent, d_ino) == sizeof_field(struct dirent64, d_ino)); | ||
25 | -assert_cc(offsetof(struct dirent, d_off) == offsetof(struct dirent64, d_off)); | ||
26 | -assert_cc(sizeof_field(struct dirent, d_off) == sizeof_field(struct dirent64, d_off)); | ||
27 | -assert_cc(offsetof(struct dirent, d_reclen) == offsetof(struct dirent64, d_reclen)); | ||
28 | -assert_cc(sizeof_field(struct dirent, d_reclen) == sizeof_field(struct dirent64, d_reclen)); | ||
29 | -assert_cc(offsetof(struct dirent, d_type) == offsetof(struct dirent64, d_type)); | ||
30 | -assert_cc(sizeof_field(struct dirent, d_type) == sizeof_field(struct dirent64, d_type)); | ||
31 | -assert_cc(offsetof(struct dirent, d_name) == offsetof(struct dirent64, d_name)); | ||
32 | -assert_cc(sizeof_field(struct dirent, d_name) == sizeof_field(struct dirent64, d_name)); | ||
33 | |||
34 | #define FOREACH_DIRENT_IN_BUFFER(de, buf, sz) \ | ||
35 | for (void *_end = (uint8_t*) ({ (de) = (buf); }) + (sz); \ | ||
36 | -- | ||
37 | 2.39.0 | ||
38 | |||
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0002-Add-sys-stat.h-for-S_IFDIR.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0002-Add-sys-stat.h-for-S_IFDIR.patch deleted file mode 100644 index 7dfa1a0df..000000000 --- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0002-Add-sys-stat.h-for-S_IFDIR.patch +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | From d16f7b37c917b91e951b9313e2c8264c72ed93e5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 21 Jan 2022 15:17:37 -0800 | ||
4 | Subject: [PATCH 2/2] Add sys/stat.h for S_IFDIR | ||
5 | |||
6 | ../git/src/shared/mkdir-label.c:13:61: error: use of undeclared identifier 'S_IFDIR' | ||
7 | r = mac_selinux_create_file_prepare_at(dirfd, path, S_IFDIR); | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | src/shared/mkdir-label.c | 1 + | ||
13 | 1 file changed, 1 insertion(+) | ||
14 | |||
15 | diff --git a/src/shared/mkdir-label.c b/src/shared/mkdir-label.c | ||
16 | index d36a6466d7..63b764cd83 100644 | ||
17 | --- a/src/shared/mkdir-label.c | ||
18 | +++ b/src/shared/mkdir-label.c | ||
19 | @@ -4,6 +4,7 @@ | ||
20 | #include "selinux-util.h" | ||
21 | #include "smack-util.h" | ||
22 | #include "user-util.h" | ||
23 | +#include <sys/stat.h> | ||
24 | |||
25 | int mkdirat_label(int dirfd, const char *path, mode_t mode) { | ||
26 | int r; | ||
27 | -- | ||
28 | 2.34.1 | ||
29 | |||
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0002-don-t-use-glibc-specific-qsort_r.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0002-don-t-use-glibc-specific-qsort_r.patch deleted file mode 100644 index 5027682df..000000000 --- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0002-don-t-use-glibc-specific-qsort_r.patch +++ /dev/null | |||
@@ -1,157 +0,0 @@ | |||
1 | From 5d730902f47498a2866b46875352f6810a01d67c Mon Sep 17 00:00:00 2001 | ||
2 | From: Chen Qi <Qi.Chen@windriver.com> | ||
3 | Date: Mon, 25 Feb 2019 13:41:41 +0800 | ||
4 | Subject: [PATCH] don't use glibc-specific qsort_r | ||
5 | |||
6 | Upstream-Status: Inappropriate [musl specific] | ||
7 | |||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | [Rebased for v241] | ||
10 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
11 | [Rebased for v242] | ||
12 | Signed-off-by: Andrej Valek <andrej.valek@siemens.com> | ||
13 | [Rebased for v247] | ||
14 | Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | ||
15 | |||
16 | --- | ||
17 | src/basic/sort-util.h | 14 -------------- | ||
18 | src/shared/format-table.c | 36 ++++++++++++++++++++++++------------ | ||
19 | src/shared/hwdb-util.c | 19 ++++++++++++++----- | ||
20 | 3 files changed, 38 insertions(+), 31 deletions(-) | ||
21 | |||
22 | --- a/src/basic/sort-util.h | ||
23 | +++ b/src/basic/sort-util.h | ||
24 | @@ -61,18 +61,4 @@ static inline void _qsort_safe(void *bas | ||
25 | _qsort_safe((p), (n), sizeof((p)[0]), (comparison_fn_t) _func_); \ | ||
26 | }) | ||
27 | |||
28 | -static inline void qsort_r_safe(void *base, size_t nmemb, size_t size, comparison_userdata_fn_t compar, void *userdata) { | ||
29 | - if (nmemb <= 1) | ||
30 | - return; | ||
31 | - | ||
32 | - assert(base); | ||
33 | - qsort_r(base, nmemb, size, compar, userdata); | ||
34 | -} | ||
35 | - | ||
36 | -#define typesafe_qsort_r(p, n, func, userdata) \ | ||
37 | - ({ \ | ||
38 | - int (*_func_)(const typeof(p[0])*, const typeof(p[0])*, typeof(userdata)) = func; \ | ||
39 | - qsort_r_safe((p), (n), sizeof((p)[0]), (comparison_userdata_fn_t) _func_, userdata); \ | ||
40 | - }) | ||
41 | - | ||
42 | int cmp_int(const int *a, const int *b); | ||
43 | --- a/src/shared/format-table.c | ||
44 | +++ b/src/shared/format-table.c | ||
45 | @@ -1324,30 +1324,32 @@ static int cell_data_compare(TableData * | ||
46 | return CMP(index_a, index_b); | ||
47 | } | ||
48 | |||
49 | -static int table_data_compare(const size_t *a, const size_t *b, Table *t) { | ||
50 | +static Table *user_table; | ||
51 | +static int table_data_compare(const void *x, const void *y) { | ||
52 | + const size_t *a = x, *b=y; | ||
53 | int r; | ||
54 | |||
55 | - assert(t); | ||
56 | - assert(t->sort_map); | ||
57 | + assert(user_table); | ||
58 | + assert(user_table->sort_map); | ||
59 | |||
60 | /* Make sure the header stays at the beginning */ | ||
61 | - if (*a < t->n_columns && *b < t->n_columns) | ||
62 | + if (*a < user_table->n_columns && *b < user_table->n_columns) | ||
63 | return 0; | ||
64 | - if (*a < t->n_columns) | ||
65 | + if (*a < user_table->n_columns) | ||
66 | return -1; | ||
67 | - if (*b < t->n_columns) | ||
68 | + if (*b < user_table->n_columns) | ||
69 | return 1; | ||
70 | |||
71 | /* Order other lines by the sorting map */ | ||
72 | - for (size_t i = 0; i < t->n_sort_map; i++) { | ||
73 | + for (size_t i = 0; i < user_table->n_sort_map; i++) { | ||
74 | TableData *d, *dd; | ||
75 | |||
76 | - d = t->data[*a + t->sort_map[i]]; | ||
77 | - dd = t->data[*b + t->sort_map[i]]; | ||
78 | + d = user_table->data[*a + user_table->sort_map[i]]; | ||
79 | + dd = user_table->data[*b + user_table->sort_map[i]]; | ||
80 | |||
81 | r = cell_data_compare(d, *a, dd, *b); | ||
82 | if (r != 0) | ||
83 | - return t->reverse_map && t->reverse_map[t->sort_map[i]] ? -r : r; | ||
84 | + return user_table->reverse_map && user_table->reverse_map[user_table->sort_map[i]] ? -r : r; | ||
85 | } | ||
86 | |||
87 | /* Order identical lines by the order there were originally added in */ | ||
88 | @@ -2009,7 +2011,12 @@ int table_print(Table *t, FILE *f) { | ||
89 | for (size_t i = 0; i < n_rows; i++) | ||
90 | sorted[i] = i * t->n_columns; | ||
91 | |||
92 | - typesafe_qsort_r(sorted, n_rows, table_data_compare, t); | ||
93 | + if (n_rows <= 1) | ||
94 | + return 0; | ||
95 | + assert(sorted); | ||
96 | + user_table = t; | ||
97 | + qsort(sorted, n_rows, sizeof(size_t), table_data_compare); | ||
98 | + user_table = NULL; | ||
99 | } | ||
100 | |||
101 | if (t->display_map) | ||
102 | @@ -2647,7 +2654,12 @@ int table_to_json(Table *t, JsonVariant | ||
103 | for (size_t i = 0; i < n_rows; i++) | ||
104 | sorted[i] = i * t->n_columns; | ||
105 | |||
106 | - typesafe_qsort_r(sorted, n_rows, table_data_compare, t); | ||
107 | + if (n_rows <= 1) | ||
108 | + return 0; | ||
109 | + assert(sorted); | ||
110 | + user_table = t; | ||
111 | + qsort(sorted, n_rows, sizeof(size_t), table_data_compare); | ||
112 | + user_table = NULL; | ||
113 | } | ||
114 | |||
115 | if (t->display_map) | ||
116 | --- a/src/shared/hwdb-util.c | ||
117 | +++ b/src/shared/hwdb-util.c | ||
118 | @@ -127,9 +127,13 @@ static struct trie* trie_free(struct tri | ||
119 | |||
120 | DEFINE_TRIVIAL_CLEANUP_FUNC(struct trie*, trie_free); | ||
121 | |||
122 | -static int trie_values_cmp(const struct trie_value_entry *a, const struct trie_value_entry *b, struct trie *trie) { | ||
123 | - return strcmp(trie->strings->buf + a->key_off, | ||
124 | - trie->strings->buf + b->key_off); | ||
125 | +static struct trie *trie_node_add_value_trie; | ||
126 | +static int trie_values_cmp(const void *v1, const void *v2) { | ||
127 | + const struct trie_value_entry *a = v1; | ||
128 | + const struct trie_value_entry *b = v2; | ||
129 | + | ||
130 | + return strcmp(trie_node_add_value_trie->strings->buf + a->key_off, | ||
131 | + trie_node_add_value_trie->strings->buf + b->key_off); | ||
132 | } | ||
133 | |||
134 | static int trie_node_add_value(struct trie *trie, struct trie_node *node, | ||
135 | @@ -157,7 +161,10 @@ static int trie_node_add_value(struct tr | ||
136 | .value_off = v, | ||
137 | }; | ||
138 | |||
139 | - val = typesafe_bsearch_r(&search, node->values, node->values_count, trie_values_cmp, trie); | ||
140 | + trie_node_add_value_trie = trie; | ||
141 | + val = bsearch(&search, node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp); | ||
142 | + trie_node_add_value_trie = NULL; | ||
143 | + | ||
144 | if (val) { | ||
145 | /* At this point we have 2 identical properties on the same match-string. | ||
146 | * Since we process files in order, we just replace the previous value. */ | ||
147 | @@ -183,7 +190,9 @@ static int trie_node_add_value(struct tr | ||
148 | .line_number = line_number, | ||
149 | }; | ||
150 | node->values_count++; | ||
151 | - typesafe_qsort_r(node->values, node->values_count, trie_values_cmp, trie); | ||
152 | + trie_node_add_value_trie = trie; | ||
153 | + qsort(node->values, node->values_count, sizeof(struct trie_value_entry), trie_values_cmp); | ||
154 | + trie_node_add_value_trie = NULL; | ||
155 | return 0; | ||
156 | } | ||
157 | |||
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0003-errno-util-Make-STRERROR-portable-for-musl.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0003-errno-util-Make-STRERROR-portable-for-musl.patch new file mode 100644 index 000000000..fcc56a2e6 --- /dev/null +++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0003-errno-util-Make-STRERROR-portable-for-musl.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From f629a76e0fba300a9d511614160fee38dd4a5e57 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 23 Jan 2023 23:39:46 -0800 | ||
4 | Subject: [PATCH] errno-util: Make STRERROR portable for musl | ||
5 | |||
6 | Sadly, systemd has decided to use yet another GNU extention in a macro | ||
7 | lets make this such that we can use XSI compliant strerror_r() for | ||
8 | non-glibc hosts | ||
9 | |||
10 | Upstream-Status: Inappropriate [musl specific] | ||
11 | |||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
13 | --- | ||
14 | src/basic/errno-util.h | 10 +++++++++- | ||
15 | 1 file changed, 9 insertions(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/src/basic/errno-util.h b/src/basic/errno-util.h | ||
18 | index 091f99c590..eb5c1f9961 100644 | ||
19 | --- a/src/basic/errno-util.h | ||
20 | +++ b/src/basic/errno-util.h | ||
21 | @@ -14,8 +14,16 @@ | ||
22 | * https://stackoverflow.com/questions/34880638/compound-literal-lifetime-and-if-blocks | ||
23 | * | ||
24 | * Note that we use the GNU variant of strerror_r() here. */ | ||
25 | -#define STRERROR(errnum) strerror_r(abs(errnum), (char[ERRNO_BUF_LEN]){}, ERRNO_BUF_LEN) | ||
26 | +static inline const char * STRERROR(int errnum); | ||
27 | |||
28 | +static inline const char * STRERROR(int errnum) { | ||
29 | +#ifdef __GLIBC__ | ||
30 | + return strerror_r(abs(errnum), (char[ERRNO_BUF_LEN]){}, ERRNO_BUF_LEN); | ||
31 | +#else | ||
32 | + static __thread char buf[ERRNO_BUF_LEN]; | ||
33 | + return strerror_r(abs(errnum), buf, ERRNO_BUF_LEN) ? "unknown error" : buf; | ||
34 | +#endif | ||
35 | +} | ||
36 | /* A helper to print an error message or message for functions that return 0 on EOF. | ||
37 | * Note that we can't use ({ … }) to define a temporary variable, so errnum is | ||
38 | * evaluated twice. */ | ||
39 | -- | ||
40 | 2.39.2 | ||
41 | |||
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0005-pass-correct-parameters-to-getdents64.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0005-pass-correct-parameters-to-getdents64.patch new file mode 100644 index 000000000..c634d8ec3 --- /dev/null +++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0005-pass-correct-parameters-to-getdents64.patch | |||
@@ -0,0 +1,37 @@ | |||
1 | From 17766c64ecc7dedf09ed2d361690fc4eda77bf42 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Fri, 21 Jan 2022 15:15:11 -0800 | ||
4 | Subject: [PATCH] pass correct parameters to getdents64 | ||
5 | |||
6 | Fixes | ||
7 | ../git/src/basic/recurse-dir.c:57:40: error: incompatible pointer types passing 'uint8_t *' (aka 'unsigned char *') to parameter of type 'struct dirent *' [-Werror,-Wincompatible-pointer-types] | ||
8 | n = getdents64(dir_fd, (uint8_t*) de->buffer + de->buffer_size, bs - de->buffer_size); | ||
9 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
10 | |||
11 | ../git/src/basic/stat-util.c:102:28: error: incompatible pointer types passing 'union (unnamed union at ../git/src/basic/stat-util.c:78:9) *' to parameter of type 'struct dirent *' [-Werror,-Wincompatible-pointer-types] | ||
12 | n = getdents64(fd, &buffer, sizeof(buffer)); | ||
13 | ^~~~~~~ | ||
14 | |||
15 | Upstream-Status: Inappropriate [musl specific] | ||
16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
17 | Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com> | ||
18 | --- | ||
19 | src/basic/recurse-dir.c | 2 +- | ||
20 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
21 | |||
22 | diff --git a/src/basic/recurse-dir.c b/src/basic/recurse-dir.c | ||
23 | index 5e98b7a5d8..aef065047b 100644 | ||
24 | --- a/src/basic/recurse-dir.c | ||
25 | +++ b/src/basic/recurse-dir.c | ||
26 | @@ -55,7 +55,7 @@ int readdir_all(int dir_fd, | ||
27 | bs = MIN(MALLOC_SIZEOF_SAFE(de) - offsetof(DirectoryEntries, buffer), (size_t) SSIZE_MAX); | ||
28 | assert(bs > de->buffer_size); | ||
29 | |||
30 | - n = getdents64(dir_fd, (uint8_t*) de->buffer + de->buffer_size, bs - de->buffer_size); | ||
31 | + n = getdents64(dir_fd, (struct dirent*)((uint8_t*) de->buffer + de->buffer_size), bs - de->buffer_size); | ||
32 | if (n < 0) | ||
33 | return -errno; | ||
34 | if (n == 0) | ||
35 | -- | ||
36 | 2.39.2 | ||
37 | |||
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0006-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0006-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch new file mode 100644 index 000000000..96322e5a5 --- /dev/null +++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0006-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch | |||
@@ -0,0 +1,52 @@ | |||
1 | From fa598869cca684c001f3dc23ce2198f5a6169e2a Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 8 Nov 2022 13:31:34 -0800 | ||
4 | Subject: [PATCH] test-bus-error: strerror() is assumed to be GNU specific | ||
5 | version mark it so | ||
6 | |||
7 | Upstream-Status: Inappropriate [Upstream systemd only supports glibc] | ||
8 | |||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | src/libsystemd/sd-bus/test-bus-error.c | 2 ++ | ||
12 | src/test/test-errno-util.c | 3 ++- | ||
13 | 2 files changed, 4 insertions(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/src/libsystemd/sd-bus/test-bus-error.c b/src/libsystemd/sd-bus/test-bus-error.c | ||
16 | index a55f3f9856..4123bf3da0 100644 | ||
17 | --- a/src/libsystemd/sd-bus/test-bus-error.c | ||
18 | +++ b/src/libsystemd/sd-bus/test-bus-error.c | ||
19 | @@ -99,7 +99,9 @@ TEST(error) { | ||
20 | assert_se(!sd_bus_error_is_set(&error)); | ||
21 | assert_se(sd_bus_error_set_errno(&error, EBUSY) == -EBUSY); | ||
22 | assert_se(streq(error.name, "System.Error.EBUSY")); | ||
23 | +#ifdef __GLIBC__ | ||
24 | assert_se(streq(error.message, STRERROR(EBUSY))); | ||
25 | +#endif | ||
26 | assert_se(sd_bus_error_has_name(&error, "System.Error.EBUSY")); | ||
27 | assert_se(sd_bus_error_get_errno(&error) == EBUSY); | ||
28 | assert_se(sd_bus_error_is_set(&error)); | ||
29 | diff --git a/src/test/test-errno-util.c b/src/test/test-errno-util.c | ||
30 | index d3d022c33f..74e95c804d 100644 | ||
31 | --- a/src/test/test-errno-util.c | ||
32 | +++ b/src/test/test-errno-util.c | ||
33 | @@ -4,7 +4,7 @@ | ||
34 | #include "stdio-util.h" | ||
35 | #include "string-util.h" | ||
36 | #include "tests.h" | ||
37 | - | ||
38 | +#ifdef __GLIBC__ | ||
39 | TEST(strerror_not_threadsafe) { | ||
40 | /* Just check that strerror really is not thread-safe. */ | ||
41 | log_info("strerror(%d) → %s", 200, strerror(200)); | ||
42 | @@ -46,6 +46,7 @@ TEST(STRERROR_OR_ELSE) { | ||
43 | log_info("STRERROR_OR_ELSE(EPERM, \"EOF\") → %s", STRERROR_OR_EOF(EPERM)); | ||
44 | log_info("STRERROR_OR_ELSE(-EPERM, \"EOF\") → %s", STRERROR_OR_EOF(-EPERM)); | ||
45 | } | ||
46 | +#endif /* __GLIBC__ */ | ||
47 | |||
48 | TEST(PROTECT_ERRNO) { | ||
49 | errno = 12; | ||
50 | -- | ||
51 | 2.39.2 | ||
52 | |||
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0008-add-missing-FTW_-macros-for-musl.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0008-add-missing-FTW_-macros-for-musl.patch deleted file mode 100644 index 57e18a580..000000000 --- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0008-add-missing-FTW_-macros-for-musl.patch +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
1 | From 7ca9887f84adba065dc2e59b3de55ace2fc72ec0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Chen Qi <Qi.Chen@windriver.com> | ||
3 | Date: Mon, 25 Feb 2019 15:00:06 +0800 | ||
4 | Subject: [PATCH] add missing FTW_ macros for musl | ||
5 | |||
6 | This is to avoid build failures like below for musl. | ||
7 | |||
8 | locale-util.c:296:24: error: 'FTW_STOP' undeclared | ||
9 | |||
10 | Upstream-Status: Inappropriate [musl specific] | ||
11 | |||
12 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
13 | |||
14 | --- | ||
15 | src/basic/missing_type.h | 20 ++++++++++++++++++++ | ||
16 | src/shared/mount-setup.c | 1 + | ||
17 | 2 files changed, 21 insertions(+) | ||
18 | |||
19 | --- a/src/basic/missing_type.h | ||
20 | +++ b/src/basic/missing_type.h | ||
21 | @@ -19,3 +19,23 @@ typedef int (*comparison_fn_t)(const voi | ||
22 | #define __COMPAR_FN_T | ||
23 | typedef int (*__compar_fn_t)(const void *, const void *); | ||
24 | #endif | ||
25 | + | ||
26 | +#ifndef FTW_ACTIONRETVAL | ||
27 | +#define FTW_ACTIONRETVAL 16 | ||
28 | +#endif | ||
29 | + | ||
30 | +#ifndef FTW_CONTINUE | ||
31 | +#define FTW_CONTINUE 0 | ||
32 | +#endif | ||
33 | + | ||
34 | +#ifndef FTW_STOP | ||
35 | +#define FTW_STOP 1 | ||
36 | +#endif | ||
37 | + | ||
38 | +#ifndef FTW_SKIP_SUBTREE | ||
39 | +#define FTW_SKIP_SUBTREE 2 | ||
40 | +#endif | ||
41 | + | ||
42 | +#ifndef FTW_SKIP_SIBLINGS | ||
43 | +#define FTW_SKIP_SIBLINGS 3 | ||
44 | +#endif | ||
45 | --- a/src/shared/mount-setup.c | ||
46 | +++ b/src/shared/mount-setup.c | ||
47 | @@ -32,6 +32,7 @@ | ||
48 | #include "strv.h" | ||
49 | #include "user-util.h" | ||
50 | #include "virt.h" | ||
51 | +#include "missing_type.h" | ||
52 | |||
53 | typedef enum MountMode { | ||
54 | MNT_NONE = 0, | ||
55 | --- a/src/test/test-recurse-dir.c | ||
56 | +++ b/src/test/test-recurse-dir.c | ||
57 | @@ -6,6 +6,7 @@ | ||
58 | #include "recurse-dir.h" | ||
59 | #include "strv.h" | ||
60 | #include "tests.h" | ||
61 | +#include "missing_type.h" | ||
62 | |||
63 | static char **list_nftw = NULL; | ||
64 | |||
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch deleted file mode 100644 index 0fc320420..000000000 --- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | From c7453b716ae308b89cf4b2b231a36ddd38a49752 Mon Sep 17 00:00:00 2001 | ||
2 | From: Chen Qi <Qi.Chen@windriver.com> | ||
3 | Date: Mon, 25 Feb 2019 15:03:47 +0800 | ||
4 | Subject: [PATCH] fix missing of __register_atfork for non-glibc builds | ||
5 | |||
6 | Upstream-Status: Inappropriate [musl specific] | ||
7 | |||
8 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
9 | |||
10 | --- | ||
11 | src/basic/process-util.c | 7 +++++++ | ||
12 | 1 file changed, 7 insertions(+) | ||
13 | |||
14 | diff --git a/src/basic/process-util.c b/src/basic/process-util.c | ||
15 | index 461bbfe9a5..2d06f9f60a 100644 | ||
16 | --- a/src/basic/process-util.c | ||
17 | +++ b/src/basic/process-util.c | ||
18 | @@ -18,6 +18,9 @@ | ||
19 | #if HAVE_VALGRIND_VALGRIND_H | ||
20 | #include <valgrind/valgrind.h> | ||
21 | #endif | ||
22 | +#ifndef __GLIBC__ | ||
23 | +#include <pthread.h> | ||
24 | +#endif | ||
25 | |||
26 | #include "alloc-util.h" | ||
27 | #include "architecture.h" | ||
28 | @@ -1202,11 +1205,15 @@ void reset_cached_pid(void) { | ||
29 | cached_pid = CACHED_PID_UNSET; | ||
30 | } | ||
31 | |||
32 | +#ifdef __GLIBC__ | ||
33 | /* We use glibc __register_atfork() + __dso_handle directly here, as they are not included in the glibc | ||
34 | * headers. __register_atfork() is mostly equivalent to pthread_atfork(), but doesn't require us to link against | ||
35 | * libpthread, as it is part of glibc anyway. */ | ||
36 | extern int __register_atfork(void (*prepare) (void), void (*parent) (void), void (*child) (void), void *dso_handle); | ||
37 | extern void* __dso_handle _weak_; | ||
38 | +#else | ||
39 | +#define __register_atfork(prepare,parent,child,dso) pthread_atfork(prepare,parent,child) | ||
40 | +#endif | ||
41 | |||
42 | pid_t getpid_cached(void) { | ||
43 | static bool installed = false; | ||
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0009-missing_type.h-add-comparison_fn_t.patch index f3edc7d82..e50b47a5a 100644 --- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch +++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0009-missing_type.h-add-comparison_fn_t.patch | |||
@@ -1,10 +1,9 @@ | |||
1 | From 3b42a888685aee1776a12cff84a5fe0063378483 Mon Sep 17 00:00:00 2001 | 1 | From 542f999a846dfd49d9373d30fffb2a44168d7b5e Mon Sep 17 00:00:00 2001 |
2 | From: Chen Qi <Qi.Chen@windriver.com> | 2 | From: Chen Qi <Qi.Chen@windriver.com> |
3 | Date: Mon, 25 Feb 2019 13:55:12 +0800 | 3 | Date: Mon, 25 Feb 2019 13:55:12 +0800 |
4 | Subject: [PATCH] missing_type.h: add __compare_fn_t and comparison_fn_t | 4 | Subject: [PATCH] missing_type.h: add comparison_fn_t |
5 | 5 | ||
6 | Make it work with musl where comparison_fn_t and __compare_fn_t | 6 | Make it work with musl where comparison_fn_t and is not provided. |
7 | is not provided. | ||
8 | 7 | ||
9 | Upstream-Status: Inappropriate [musl specific] | 8 | Upstream-Status: Inappropriate [musl specific] |
10 | 9 | ||
@@ -13,17 +12,19 @@ Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> | |||
13 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | 12 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> |
14 | [Rebased for v242] | 13 | [Rebased for v242] |
15 | Signed-off-by: Andrej Valek <andrej.valek@siemens.com> | 14 | Signed-off-by: Andrej Valek <andrej.valek@siemens.com> |
16 | 15 | [Rebased for v250, Drop __compare_fn_t] | |
16 | Signed-off-by: Jiaqing Zhao <jiaqing.zhao@linux.intel.com> | ||
17 | --- | 17 | --- |
18 | src/basic/missing_type.h | 9 +++++++++ | 18 | src/basic/missing_type.h | 4 ++++ |
19 | src/basic/sort-util.h | 1 + | 19 | src/basic/sort-util.h | 1 + |
20 | src/core/kmod-setup.c | 1 + | ||
21 | src/libsystemd/sd-journal/catalog.c | 1 + | 20 | src/libsystemd/sd-journal/catalog.c | 1 + |
22 | 4 files changed, 12 insertions(+) | 21 | 3 files changed, 6 insertions(+) |
23 | 22 | ||
23 | diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h | ||
24 | index f6233090a9..6c0456349d 100644 | ||
24 | --- a/src/basic/missing_type.h | 25 | --- a/src/basic/missing_type.h |
25 | +++ b/src/basic/missing_type.h | 26 | +++ b/src/basic/missing_type.h |
26 | @@ -10,3 +10,12 @@ | 27 | @@ -10,3 +10,7 @@ |
27 | #if !HAVE_CHAR16_T | 28 | #if !HAVE_CHAR16_T |
28 | #define char16_t uint16_t | 29 | #define char16_t uint16_t |
29 | #endif | 30 | #endif |
@@ -31,11 +32,8 @@ Signed-off-by: Andrej Valek <andrej.valek@siemens.com> | |||
31 | +#ifndef __GLIBC__ | 32 | +#ifndef __GLIBC__ |
32 | +typedef int (*comparison_fn_t)(const void *, const void *); | 33 | +typedef int (*comparison_fn_t)(const void *, const void *); |
33 | +#endif | 34 | +#endif |
34 | + | 35 | diff --git a/src/basic/sort-util.h b/src/basic/sort-util.h |
35 | +#ifndef __COMPAR_FN_T | 36 | index f0bf246aa3..33669c7a75 100644 |
36 | +#define __COMPAR_FN_T | ||
37 | +typedef int (*__compar_fn_t)(const void *, const void *); | ||
38 | +#endif | ||
39 | --- a/src/basic/sort-util.h | 37 | --- a/src/basic/sort-util.h |
40 | +++ b/src/basic/sort-util.h | 38 | +++ b/src/basic/sort-util.h |
41 | @@ -4,6 +4,7 @@ | 39 | @@ -4,6 +4,7 @@ |
@@ -46,16 +44,8 @@ Signed-off-by: Andrej Valek <andrej.valek@siemens.com> | |||
46 | 44 | ||
47 | /* This is the same as glibc's internal __compar_d_fn_t type. glibc exports a public comparison_fn_t, for the | 45 | /* This is the same as glibc's internal __compar_d_fn_t type. glibc exports a public comparison_fn_t, for the |
48 | * external type __compar_fn_t, but doesn't do anything similar for __compar_d_fn_t. Let's hence do that | 46 | * external type __compar_fn_t, but doesn't do anything similar for __compar_d_fn_t. Let's hence do that |
49 | --- a/src/core/kmod-setup.c | 47 | diff --git a/src/libsystemd/sd-journal/catalog.c b/src/libsystemd/sd-journal/catalog.c |
50 | +++ b/src/core/kmod-setup.c | 48 | index 7527abf636..f33383e57f 100644 |
51 | @@ -10,6 +10,7 @@ | ||
52 | #include "macro.h" | ||
53 | #include "recurse-dir.h" | ||
54 | #include "string-util.h" | ||
55 | +#include "missing_type.h" | ||
56 | |||
57 | #if HAVE_KMOD | ||
58 | #include "module-util.h" | ||
59 | --- a/src/libsystemd/sd-journal/catalog.c | 49 | --- a/src/libsystemd/sd-journal/catalog.c |
60 | +++ b/src/libsystemd/sd-journal/catalog.c | 50 | +++ b/src/libsystemd/sd-journal/catalog.c |
61 | @@ -28,6 +28,7 @@ | 51 | @@ -28,6 +28,7 @@ |
@@ -66,3 +56,6 @@ Signed-off-by: Andrej Valek <andrej.valek@siemens.com> | |||
66 | 56 | ||
67 | const char * const catalog_file_dirs[] = { | 57 | const char * const catalog_file_dirs[] = { |
68 | "/usr/local/lib/systemd/catalog/", | 58 | "/usr/local/lib/systemd/catalog/", |
59 | -- | ||
60 | 2.39.2 | ||
61 | |||
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0004-add-fallback-parse_printf_format-implementation.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0010-add-fallback-parse_printf_format-implementation.patch index d93f63075..4143ab4d7 100644 --- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0004-add-fallback-parse_printf_format-implementation.patch +++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0010-add-fallback-parse_printf_format-implementation.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 3e0df2c22bfd37bc62bf09a01ec498e40d3599de Mon Sep 17 00:00:00 2001 | 1 | From 383e85e15f16a46aac925aa439b8b60f58b40aa6 Mon Sep 17 00:00:00 2001 |
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> |
3 | Date: Sat, 22 May 2021 20:26:24 +0200 | 3 | Date: Sat, 22 May 2021 20:26:24 +0200 |
4 | Subject: [PATCH] add fallback parse_printf_format implementation | 4 | Subject: [PATCH] add fallback parse_printf_format implementation |
@@ -10,7 +10,6 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
10 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | 10 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> |
11 | [rebased for systemd 243] | 11 | [rebased for systemd 243] |
12 | Signed-off-by: Scott Murray <scott.murray@konsulko.com> | 12 | Signed-off-by: Scott Murray <scott.murray@konsulko.com> |
13 | |||
14 | --- | 13 | --- |
15 | meson.build | 1 + | 14 | meson.build | 1 + |
16 | src/basic/meson.build | 5 + | 15 | src/basic/meson.build | 5 + |
@@ -24,17 +23,17 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
24 | 23 | ||
25 | --- a/meson.build | 24 | --- a/meson.build |
26 | +++ b/meson.build | 25 | +++ b/meson.build |
27 | @@ -686,6 +686,7 @@ endif | 26 | @@ -781,6 +781,7 @@ endif |
28 | foreach header : ['crypt.h', | 27 | foreach header : ['crypt.h', |
29 | 'linux/memfd.h', | 28 | 'linux/memfd.h', |
30 | 'linux/vm_sockets.h', | 29 | 'linux/vm_sockets.h', |
31 | + 'printf.h', | 30 | + 'printf.h', |
32 | 'sys/auxv.h', | 31 | 'sys/auxv.h', |
32 | 'threads.h', | ||
33 | 'valgrind/memcheck.h', | 33 | 'valgrind/memcheck.h', |
34 | 'valgrind/valgrind.h', | ||
35 | --- a/src/basic/meson.build | 34 | --- a/src/basic/meson.build |
36 | +++ b/src/basic/meson.build | 35 | +++ b/src/basic/meson.build |
37 | @@ -335,6 +335,11 @@ endforeach | 36 | @@ -179,6 +179,11 @@ endforeach |
38 | 37 | ||
39 | basic_sources += generated_gperf_headers | 38 | basic_sources += generated_gperf_headers |
40 | 39 | ||
@@ -384,7 +383,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
384 | +#endif /* HAVE_PRINTF_H */ | 383 | +#endif /* HAVE_PRINTF_H */ |
385 | --- a/src/basic/stdio-util.h | 384 | --- a/src/basic/stdio-util.h |
386 | +++ b/src/basic/stdio-util.h | 385 | +++ b/src/basic/stdio-util.h |
387 | @@ -1,13 +1,13 @@ | 386 | @@ -1,12 +1,12 @@ |
388 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | 387 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
389 | #pragma once | 388 | #pragma once |
390 | 389 | ||
@@ -394,11 +393,10 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
394 | #include <sys/types.h> | 393 | #include <sys/types.h> |
395 | 394 | ||
396 | #include "macro.h" | 395 | #include "macro.h" |
397 | #include "memory-util.h" | ||
398 | +#include "parse-printf-format.h" | 396 | +#include "parse-printf-format.h" |
399 | 397 | ||
400 | #define snprintf_ok(buf, len, fmt, ...) \ | 398 | _printf_(3, 4) |
401 | ({ \ | 399 | static inline char *snprintf_ok(char *buf, size_t len, const char *format, ...) { |
402 | --- a/src/libsystemd/sd-journal/journal-send.c | 400 | --- a/src/libsystemd/sd-journal/journal-send.c |
403 | +++ b/src/libsystemd/sd-journal/journal-send.c | 401 | +++ b/src/libsystemd/sd-journal/journal-send.c |
404 | @@ -2,7 +2,6 @@ | 402 | @@ -2,7 +2,6 @@ |
@@ -409,7 +407,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
409 | #include <stddef.h> | 407 | #include <stddef.h> |
410 | #include <sys/un.h> | 408 | #include <sys/un.h> |
411 | #include <unistd.h> | 409 | #include <unistd.h> |
412 | @@ -21,6 +20,7 @@ | 410 | @@ -27,6 +26,7 @@ |
413 | #include "stdio-util.h" | 411 | #include "stdio-util.h" |
414 | #include "string-util.h" | 412 | #include "string-util.h" |
415 | #include "tmpfile-util.h" | 413 | #include "tmpfile-util.h" |
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0011-src-basic-missing.h-check-for-missing-strndupa.patch index 005ef022f..ec451cddb 100644 --- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch +++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0011-src-basic-missing.h-check-for-missing-strndupa.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From cef23a651ea200e30e1e6ed2a2564505e3a42d46 Mon Sep 17 00:00:00 2001 | 1 | From ee5c8b494a3269edd154a0b799a03b39dba2ceb0 Mon Sep 17 00:00:00 2001 |
2 | From: Chen Qi <Qi.Chen@windriver.com> | 2 | From: Chen Qi <Qi.Chen@windriver.com> |
3 | Date: Mon, 25 Feb 2019 14:18:21 +0800 | 3 | Date: Mon, 25 Feb 2019 14:18:21 +0800 |
4 | Subject: [PATCH] src/basic/missing.h: check for missing strndupa | 4 | Subject: [PATCH] src/basic/missing.h: check for missing strndupa |
@@ -17,7 +17,7 @@ Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> | |||
17 | [rebased for systemd 244] | 17 | [rebased for systemd 244] |
18 | [Rebased for v247] | 18 | [Rebased for v247] |
19 | Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | 19 | Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> |
20 | 20 | [Rebased for v254] | |
21 | --- | 21 | --- |
22 | meson.build | 1 + | 22 | meson.build | 1 + |
23 | src/backlight/backlight.c | 1 + | 23 | src/backlight/backlight.c | 1 + |
@@ -41,6 +41,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
41 | src/core/kmod-setup.c | 1 + | 41 | src/core/kmod-setup.c | 1 + |
42 | src/core/service.c | 1 + | 42 | src/core/service.c | 1 + |
43 | src/coredump/coredump-vacuum.c | 1 + | 43 | src/coredump/coredump-vacuum.c | 1 + |
44 | src/fstab-generator/fstab-generator.c | 1 + | ||
44 | src/journal-remote/journal-remote-main.c | 1 + | 45 | src/journal-remote/journal-remote-main.c | 1 + |
45 | src/journal/journalctl.c | 1 + | 46 | src/journal/journalctl.c | 1 + |
46 | src/libsystemd/sd-bus/bus-message.c | 1 + | 47 | src/libsystemd/sd-bus/bus-message.c | 1 + |
@@ -49,7 +50,6 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
49 | src/libsystemd/sd-bus/sd-bus.c | 1 + | 50 | src/libsystemd/sd-bus/sd-bus.c | 1 + |
50 | src/libsystemd/sd-bus/test-bus-benchmark.c | 1 + | 51 | src/libsystemd/sd-bus/test-bus-benchmark.c | 1 + |
51 | src/libsystemd/sd-journal/sd-journal.c | 1 + | 52 | src/libsystemd/sd-journal/sd-journal.c | 1 + |
52 | src/locale/keymap-util.c | 1 + | ||
53 | src/login/pam_systemd.c | 1 + | 53 | src/login/pam_systemd.c | 1 + |
54 | src/network/generator/network-generator.c | 1 + | 54 | src/network/generator/network-generator.c | 1 + |
55 | src/nspawn/nspawn-settings.c | 1 + | 55 | src/nspawn/nspawn-settings.c | 1 + |
@@ -64,17 +64,18 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
64 | src/shared/journal-importer.c | 1 + | 64 | src/shared/journal-importer.c | 1 + |
65 | src/shared/logs-show.c | 1 + | 65 | src/shared/logs-show.c | 1 + |
66 | src/shared/pager.c | 1 + | 66 | src/shared/pager.c | 1 + |
67 | src/shared/uid-range.c | 1 + | ||
68 | src/socket-proxy/socket-proxyd.c | 1 + | 67 | src/socket-proxy/socket-proxyd.c | 1 + |
69 | src/test/test-hexdecoct.c | 1 + | 68 | src/test/test-hexdecoct.c | 1 + |
70 | src/udev/udev-builtin-path_id.c | 1 + | 69 | src/udev/udev-builtin-path_id.c | 1 + |
71 | src/udev/udev-event.c | 1 + | 70 | src/udev/udev-event.c | 1 + |
72 | src/udev/udev-rules.c | 1 + | 71 | src/udev/udev-rules.c | 1 + |
73 | 51 files changed, 62 insertions(+) | 72 | 50 files changed, 61 insertions(+) |
74 | 73 | ||
74 | diff --git a/meson.build b/meson.build | ||
75 | index fb96143c37..739b2f7f72 100644 | ||
75 | --- a/meson.build | 76 | --- a/meson.build |
76 | +++ b/meson.build | 77 | +++ b/meson.build |
77 | @@ -507,6 +507,7 @@ foreach ident : ['secure_getenv', '__sec | 78 | @@ -595,6 +595,7 @@ foreach ident : ['secure_getenv', '__secure_getenv'] |
78 | endforeach | 79 | endforeach |
79 | 80 | ||
80 | foreach ident : [ | 81 | foreach ident : [ |
@@ -82,19 +83,23 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
82 | ['memfd_create', '''#include <sys/mman.h>'''], | 83 | ['memfd_create', '''#include <sys/mman.h>'''], |
83 | ['gettid', '''#include <sys/types.h> | 84 | ['gettid', '''#include <sys/types.h> |
84 | #include <unistd.h>'''], | 85 | #include <unistd.h>'''], |
86 | diff --git a/src/backlight/backlight.c b/src/backlight/backlight.c | ||
87 | index e66477f328..2613d1e3f9 100644 | ||
85 | --- a/src/backlight/backlight.c | 88 | --- a/src/backlight/backlight.c |
86 | +++ b/src/backlight/backlight.c | 89 | +++ b/src/backlight/backlight.c |
87 | @@ -19,6 +19,7 @@ | 90 | @@ -19,6 +19,7 @@ |
88 | #include "string-util.h" | 91 | #include "string-util.h" |
89 | #include "strv.h" | 92 | #include "strv.h" |
90 | #include "util.h" | 93 | #include "terminal-util.h" |
91 | +#include "missing_stdlib.h" | 94 | +#include "missing_stdlib.h" |
92 | 95 | ||
93 | static int help(void) { | 96 | #define PCI_CLASS_GRAPHICS_CARD 0x30000 |
94 | _cleanup_free_ char *link = NULL; | 97 | |
98 | diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c | ||
99 | index feda596939..11b4375ed5 100644 | ||
95 | --- a/src/basic/cgroup-util.c | 100 | --- a/src/basic/cgroup-util.c |
96 | +++ b/src/basic/cgroup-util.c | 101 | +++ b/src/basic/cgroup-util.c |
97 | @@ -37,6 +37,7 @@ | 102 | @@ -38,6 +38,7 @@ |
98 | #include "unit-name.h" | 103 | #include "unit-name.h" |
99 | #include "user-util.h" | 104 | #include "user-util.h" |
100 | #include "xattr-util.h" | 105 | #include "xattr-util.h" |
@@ -102,6 +107,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
102 | 107 | ||
103 | static int cg_enumerate_items(const char *controller, const char *path, FILE **_f, const char *item) { | 108 | static int cg_enumerate_items(const char *controller, const char *path, FILE **_f, const char *item) { |
104 | _cleanup_free_ char *fs = NULL; | 109 | _cleanup_free_ char *fs = NULL; |
110 | diff --git a/src/basic/env-util.c b/src/basic/env-util.c | ||
111 | index 55ac11a512..7ccb1d7887 100644 | ||
105 | --- a/src/basic/env-util.c | 112 | --- a/src/basic/env-util.c |
106 | +++ b/src/basic/env-util.c | 113 | +++ b/src/basic/env-util.c |
107 | @@ -19,6 +19,7 @@ | 114 | @@ -19,6 +19,7 @@ |
@@ -112,16 +119,20 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
112 | 119 | ||
113 | /* We follow bash for the character set. Different shells have different rules. */ | 120 | /* We follow bash for the character set. Different shells have different rules. */ |
114 | #define VALID_BASH_ENV_NAME_CHARS \ | 121 | #define VALID_BASH_ENV_NAME_CHARS \ |
122 | diff --git a/src/basic/log.c b/src/basic/log.c | ||
123 | index fc5793139e..515218fca8 100644 | ||
115 | --- a/src/basic/log.c | 124 | --- a/src/basic/log.c |
116 | +++ b/src/basic/log.c | 125 | +++ b/src/basic/log.c |
117 | @@ -36,6 +36,7 @@ | 126 | @@ -40,6 +40,7 @@ |
118 | #include "terminal-util.h" | 127 | #include "terminal-util.h" |
119 | #include "time-util.h" | 128 | #include "time-util.h" |
120 | #include "utf8.h" | 129 | #include "utf8.h" |
121 | +#include "missing_stdlib.h" | 130 | +#include "missing_stdlib.h" |
122 | 131 | ||
123 | #define SNDBUF_SIZE (8*1024*1024) | 132 | #define SNDBUF_SIZE (8*1024*1024) |
124 | 133 | #define IOVEC_MAX 256U | |
134 | diff --git a/src/basic/missing_stdlib.h b/src/basic/missing_stdlib.h | ||
135 | index 8c76f93eb2..9068bfb4f0 100644 | ||
125 | --- a/src/basic/missing_stdlib.h | 136 | --- a/src/basic/missing_stdlib.h |
126 | +++ b/src/basic/missing_stdlib.h | 137 | +++ b/src/basic/missing_stdlib.h |
127 | @@ -11,3 +11,15 @@ | 138 | @@ -11,3 +11,15 @@ |
@@ -140,6 +151,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
140 | + (char *)memcpy(__new, __old, __len); \ | 151 | + (char *)memcpy(__new, __old, __len); \ |
141 | + }) | 152 | + }) |
142 | +#endif | 153 | +#endif |
154 | diff --git a/src/basic/mkdir.c b/src/basic/mkdir.c | ||
155 | index 7ad19ee33b..cc1d5e1e5b 100644 | ||
143 | --- a/src/basic/mkdir.c | 156 | --- a/src/basic/mkdir.c |
144 | +++ b/src/basic/mkdir.c | 157 | +++ b/src/basic/mkdir.c |
145 | @@ -15,6 +15,7 @@ | 158 | @@ -15,6 +15,7 @@ |
@@ -148,11 +161,13 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
148 | #include "user-util.h" | 161 | #include "user-util.h" |
149 | +#include "missing_stdlib.h" | 162 | +#include "missing_stdlib.h" |
150 | 163 | ||
151 | int mkdir_safe_internal( | 164 | int mkdirat_safe_internal( |
152 | const char *path, | 165 | int dir_fd, |
166 | diff --git a/src/basic/mountpoint-util.c b/src/basic/mountpoint-util.c | ||
167 | index bc74fbef8f..cdb609bb84 100644 | ||
153 | --- a/src/basic/mountpoint-util.c | 168 | --- a/src/basic/mountpoint-util.c |
154 | +++ b/src/basic/mountpoint-util.c | 169 | +++ b/src/basic/mountpoint-util.c |
155 | @@ -13,6 +13,7 @@ | 170 | @@ -18,6 +18,7 @@ |
156 | #include "missing_stat.h" | 171 | #include "missing_stat.h" |
157 | #include "missing_syscall.h" | 172 | #include "missing_syscall.h" |
158 | #include "mkdir.h" | 173 | #include "mkdir.h" |
@@ -160,6 +175,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
160 | #include "mountpoint-util.h" | 175 | #include "mountpoint-util.h" |
161 | #include "nulstr-util.h" | 176 | #include "nulstr-util.h" |
162 | #include "parse-util.h" | 177 | #include "parse-util.h" |
178 | diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c | ||
179 | index 3445d31307..d82b4415d9 100644 | ||
163 | --- a/src/basic/parse-util.c | 180 | --- a/src/basic/parse-util.c |
164 | +++ b/src/basic/parse-util.c | 181 | +++ b/src/basic/parse-util.c |
165 | @@ -18,6 +18,7 @@ | 182 | @@ -18,6 +18,7 @@ |
@@ -170,6 +187,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
170 | 187 | ||
171 | int parse_boolean(const char *v) { | 188 | int parse_boolean(const char *v) { |
172 | if (!v) | 189 | if (!v) |
190 | diff --git a/src/basic/path-lookup.c b/src/basic/path-lookup.c | ||
191 | index c99e9d8786..71a917a0b0 100644 | ||
173 | --- a/src/basic/path-lookup.c | 192 | --- a/src/basic/path-lookup.c |
174 | +++ b/src/basic/path-lookup.c | 193 | +++ b/src/basic/path-lookup.c |
175 | @@ -16,6 +16,7 @@ | 194 | @@ -16,6 +16,7 @@ |
@@ -180,6 +199,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
180 | 199 | ||
181 | int xdg_user_runtime_dir(char **ret, const char *suffix) { | 200 | int xdg_user_runtime_dir(char **ret, const char *suffix) { |
182 | const char *e; | 201 | const char *e; |
202 | diff --git a/src/basic/percent-util.c b/src/basic/percent-util.c | ||
203 | index cab9d0eaea..5f6ca258e9 100644 | ||
183 | --- a/src/basic/percent-util.c | 204 | --- a/src/basic/percent-util.c |
184 | +++ b/src/basic/percent-util.c | 205 | +++ b/src/basic/percent-util.c |
185 | @@ -3,6 +3,7 @@ | 206 | @@ -3,6 +3,7 @@ |
@@ -190,16 +211,20 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
190 | 211 | ||
191 | static int parse_parts_value_whole(const char *p, const char *symbol) { | 212 | static int parse_parts_value_whole(const char *p, const char *symbol) { |
192 | const char *pc, *n; | 213 | const char *pc, *n; |
214 | diff --git a/src/basic/proc-cmdline.c b/src/basic/proc-cmdline.c | ||
215 | index eea70d8606..ae3abd8402 100644 | ||
193 | --- a/src/basic/proc-cmdline.c | 216 | --- a/src/basic/proc-cmdline.c |
194 | +++ b/src/basic/proc-cmdline.c | 217 | +++ b/src/basic/proc-cmdline.c |
195 | @@ -15,6 +15,7 @@ | 218 | @@ -16,6 +16,7 @@ |
196 | #include "string-util.h" | 219 | #include "string-util.h" |
197 | #include "util.h" | 220 | #include "strv.h" |
198 | #include "virt.h" | 221 | #include "virt.h" |
199 | +#include "missing_stdlib.h" | 222 | +#include "missing_stdlib.h" |
200 | 223 | ||
201 | int proc_cmdline(char **ret) { | 224 | int proc_cmdline_filter_pid1_args(char **argv, char ***ret) { |
202 | const char *e; | 225 | enum { |
226 | diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c | ||
227 | index bcba5a5208..64a95dd866 100644 | ||
203 | --- a/src/basic/procfs-util.c | 228 | --- a/src/basic/procfs-util.c |
204 | +++ b/src/basic/procfs-util.c | 229 | +++ b/src/basic/procfs-util.c |
205 | @@ -12,6 +12,7 @@ | 230 | @@ -12,6 +12,7 @@ |
@@ -210,9 +235,11 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
210 | 235 | ||
211 | int procfs_get_pid_max(uint64_t *ret) { | 236 | int procfs_get_pid_max(uint64_t *ret) { |
212 | _cleanup_free_ char *value = NULL; | 237 | _cleanup_free_ char *value = NULL; |
238 | diff --git a/src/basic/time-util.c b/src/basic/time-util.c | ||
239 | index b700f364ef..48a26bcec9 100644 | ||
213 | --- a/src/basic/time-util.c | 240 | --- a/src/basic/time-util.c |
214 | +++ b/src/basic/time-util.c | 241 | +++ b/src/basic/time-util.c |
215 | @@ -26,6 +26,7 @@ | 242 | @@ -27,6 +27,7 @@ |
216 | #include "string-util.h" | 243 | #include "string-util.h" |
217 | #include "strv.h" | 244 | #include "strv.h" |
218 | #include "time-util.h" | 245 | #include "time-util.h" |
@@ -220,19 +247,35 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
220 | 247 | ||
221 | static clockid_t map_clock_id(clockid_t c) { | 248 | static clockid_t map_clock_id(clockid_t c) { |
222 | 249 | ||
250 | diff --git a/src/boot/bless-boot.c b/src/boot/bless-boot.c | ||
251 | index 59f02b761a..7496646350 100644 | ||
223 | --- a/src/boot/bless-boot.c | 252 | --- a/src/boot/bless-boot.c |
224 | +++ b/src/boot/bless-boot.c | 253 | +++ b/src/boot/bless-boot.c |
225 | @@ -19,6 +19,7 @@ | 254 | @@ -22,6 +22,7 @@ |
226 | #include "util.h" | 255 | #include "terminal-util.h" |
227 | #include "verbs.h" | 256 | #include "verbs.h" |
228 | #include "virt.h" | 257 | #include "virt.h" |
229 | +#include "missing_stdlib.h" | 258 | +#include "missing_stdlib.h" |
230 | 259 | ||
231 | static char **arg_path = NULL; | 260 | static char **arg_path = NULL; |
232 | 261 | ||
262 | diff --git a/src/core/dbus-cgroup.c b/src/core/dbus-cgroup.c | ||
263 | index b5484eda78..54ed62c790 100644 | ||
264 | --- a/src/core/dbus-cgroup.c | ||
265 | +++ b/src/core/dbus-cgroup.c | ||
266 | @@ -23,6 +23,7 @@ | ||
267 | #include "parse-util.h" | ||
268 | #include "path-util.h" | ||
269 | #include "percent-util.h" | ||
270 | +#include "missing_stdlib.h" | ||
271 | #include "socket-util.h" | ||
272 | |||
273 | BUS_DEFINE_PROPERTY_GET(bus_property_get_tasks_max, "t", TasksMax, tasks_max_resolve); | ||
274 | diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c | ||
275 | index f514b8fd12..4febd0d496 100644 | ||
233 | --- a/src/core/dbus-execute.c | 276 | --- a/src/core/dbus-execute.c |
234 | +++ b/src/core/dbus-execute.c | 277 | +++ b/src/core/dbus-execute.c |
235 | @@ -44,6 +44,7 @@ | 278 | @@ -48,6 +48,7 @@ |
236 | #include "unit-printf.h" | 279 | #include "unit-printf.h" |
237 | #include "user-util.h" | 280 | #include "user-util.h" |
238 | #include "utf8.h" | 281 | #include "utf8.h" |
@@ -240,6 +283,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
240 | 283 | ||
241 | BUS_DEFINE_PROPERTY_GET_ENUM(bus_property_get_exec_output, exec_output, ExecOutput); | 284 | BUS_DEFINE_PROPERTY_GET_ENUM(bus_property_get_exec_output, exec_output, ExecOutput); |
242 | static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_exec_input, exec_input, ExecInput); | 285 | static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_exec_input, exec_input, ExecInput); |
286 | diff --git a/src/core/dbus-util.c b/src/core/dbus-util.c | ||
287 | index edfa0eb69a..6fd2ec9062 100644 | ||
243 | --- a/src/core/dbus-util.c | 288 | --- a/src/core/dbus-util.c |
244 | +++ b/src/core/dbus-util.c | 289 | +++ b/src/core/dbus-util.c |
245 | @@ -9,6 +9,7 @@ | 290 | @@ -9,6 +9,7 @@ |
@@ -250,9 +295,11 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
250 | 295 | ||
251 | int bus_property_get_triggered_unit( | 296 | int bus_property_get_triggered_unit( |
252 | sd_bus *bus, | 297 | sd_bus *bus, |
298 | diff --git a/src/core/execute.c b/src/core/execute.c | ||
299 | index 853e87450f..8ef76de9ab 100644 | ||
253 | --- a/src/core/execute.c | 300 | --- a/src/core/execute.c |
254 | +++ b/src/core/execute.c | 301 | +++ b/src/core/execute.c |
255 | @@ -102,6 +102,7 @@ | 302 | @@ -113,6 +113,7 @@ |
256 | #include "unit-serialize.h" | 303 | #include "unit-serialize.h" |
257 | #include "user-util.h" | 304 | #include "user-util.h" |
258 | #include "utmp-wtmp.h" | 305 | #include "utmp-wtmp.h" |
@@ -260,29 +307,35 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
260 | 307 | ||
261 | #define IDLE_TIMEOUT_USEC (5*USEC_PER_SEC) | 308 | #define IDLE_TIMEOUT_USEC (5*USEC_PER_SEC) |
262 | #define IDLE_TIMEOUT2_USEC (1*USEC_PER_SEC) | 309 | #define IDLE_TIMEOUT2_USEC (1*USEC_PER_SEC) |
310 | diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c | ||
311 | index e843743777..e149807492 100644 | ||
263 | --- a/src/core/kmod-setup.c | 312 | --- a/src/core/kmod-setup.c |
264 | +++ b/src/core/kmod-setup.c | 313 | +++ b/src/core/kmod-setup.c |
265 | @@ -11,6 +11,7 @@ | 314 | @@ -13,6 +13,7 @@ |
266 | #include "recurse-dir.h" | ||
267 | #include "string-util.h" | 315 | #include "string-util.h" |
268 | #include "missing_type.h" | 316 | #include "strv.h" |
317 | #include "virt.h" | ||
269 | +#include "missing_stdlib.h" | 318 | +#include "missing_stdlib.h" |
270 | 319 | ||
271 | #if HAVE_KMOD | 320 | #if HAVE_KMOD |
272 | #include "module-util.h" | 321 | #include "module-util.h" |
322 | diff --git a/src/core/service.c b/src/core/service.c | ||
323 | index 9ad3c3d995..b112d64919 100644 | ||
273 | --- a/src/core/service.c | 324 | --- a/src/core/service.c |
274 | +++ b/src/core/service.c | 325 | +++ b/src/core/service.c |
275 | @@ -42,6 +42,7 @@ | 326 | @@ -45,6 +45,7 @@ |
327 | #include "unit-name.h" | ||
276 | #include "unit.h" | 328 | #include "unit.h" |
277 | #include "utf8.h" | 329 | #include "utf8.h" |
278 | #include "util.h" | ||
279 | +#include "missing_stdlib.h" | 330 | +#include "missing_stdlib.h" |
280 | 331 | ||
281 | static const UnitActiveState state_translation_table[_SERVICE_STATE_MAX] = { | 332 | #define service_spawn(...) service_spawn_internal(__func__, __VA_ARGS__) |
282 | [SERVICE_DEAD] = UNIT_INACTIVE, | 333 | |
334 | diff --git a/src/coredump/coredump-vacuum.c b/src/coredump/coredump-vacuum.c | ||
335 | index c6e201ecf2..ab034475e2 100644 | ||
283 | --- a/src/coredump/coredump-vacuum.c | 336 | --- a/src/coredump/coredump-vacuum.c |
284 | +++ b/src/coredump/coredump-vacuum.c | 337 | +++ b/src/coredump/coredump-vacuum.c |
285 | @@ -16,6 +16,7 @@ | 338 | @@ -17,6 +17,7 @@ |
286 | #include "string-util.h" | 339 | #include "string-util.h" |
287 | #include "time-util.h" | 340 | #include "time-util.h" |
288 | #include "user-util.h" | 341 | #include "user-util.h" |
@@ -290,9 +343,23 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
290 | 343 | ||
291 | #define DEFAULT_MAX_USE_LOWER (uint64_t) (1ULL*1024ULL*1024ULL) /* 1 MiB */ | 344 | #define DEFAULT_MAX_USE_LOWER (uint64_t) (1ULL*1024ULL*1024ULL) /* 1 MiB */ |
292 | #define DEFAULT_MAX_USE_UPPER (uint64_t) (4ULL*1024ULL*1024ULL*1024ULL) /* 4 GiB */ | 345 | #define DEFAULT_MAX_USE_UPPER (uint64_t) (4ULL*1024ULL*1024ULL*1024ULL) /* 4 GiB */ |
346 | diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c | ||
347 | index efc553b698..acea922311 100644 | ||
348 | --- a/src/fstab-generator/fstab-generator.c | ||
349 | +++ b/src/fstab-generator/fstab-generator.c | ||
350 | @@ -37,6 +37,7 @@ | ||
351 | #include "unit-name.h" | ||
352 | #include "virt.h" | ||
353 | #include "volatile-util.h" | ||
354 | +#include "missing_stdlib.h" | ||
355 | |||
356 | typedef enum MountPointFlags { | ||
357 | MOUNT_NOAUTO = 1 << 0, | ||
358 | diff --git a/src/journal-remote/journal-remote-main.c b/src/journal-remote/journal-remote-main.c | ||
359 | index 7df264fb53..9463a0e9fb 100644 | ||
293 | --- a/src/journal-remote/journal-remote-main.c | 360 | --- a/src/journal-remote/journal-remote-main.c |
294 | +++ b/src/journal-remote/journal-remote-main.c | 361 | +++ b/src/journal-remote/journal-remote-main.c |
295 | @@ -24,6 +24,7 @@ | 362 | @@ -26,6 +26,7 @@ |
296 | #include "stat-util.h" | 363 | #include "stat-util.h" |
297 | #include "string-table.h" | 364 | #include "string-table.h" |
298 | #include "strv.h" | 365 | #include "strv.h" |
@@ -300,9 +367,11 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
300 | 367 | ||
301 | #define PRIV_KEY_FILE CERTIFICATE_ROOT "/private/journal-remote.pem" | 368 | #define PRIV_KEY_FILE CERTIFICATE_ROOT "/private/journal-remote.pem" |
302 | #define CERT_FILE CERTIFICATE_ROOT "/certs/journal-remote.pem" | 369 | #define CERT_FILE CERTIFICATE_ROOT "/certs/journal-remote.pem" |
370 | diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c | ||
371 | index da0fac548e..c1c043e0e0 100644 | ||
303 | --- a/src/journal/journalctl.c | 372 | --- a/src/journal/journalctl.c |
304 | +++ b/src/journal/journalctl.c | 373 | +++ b/src/journal/journalctl.c |
305 | @@ -73,6 +73,7 @@ | 374 | @@ -77,6 +77,7 @@ |
306 | #include "unit-name.h" | 375 | #include "unit-name.h" |
307 | #include "user-util.h" | 376 | #include "user-util.h" |
308 | #include "varlink.h" | 377 | #include "varlink.h" |
@@ -310,16 +379,20 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
310 | 379 | ||
311 | #define DEFAULT_FSS_INTERVAL_USEC (15*USEC_PER_MINUTE) | 380 | #define DEFAULT_FSS_INTERVAL_USEC (15*USEC_PER_MINUTE) |
312 | #define PROCESS_INOTIFY_INTERVAL 1024 /* Every 1,024 messages processed */ | 381 | #define PROCESS_INOTIFY_INTERVAL 1024 /* Every 1,024 messages processed */ |
382 | diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c | ||
383 | index 9719f97c02..75decd9834 100644 | ||
313 | --- a/src/libsystemd/sd-bus/bus-message.c | 384 | --- a/src/libsystemd/sd-bus/bus-message.c |
314 | +++ b/src/libsystemd/sd-bus/bus-message.c | 385 | +++ b/src/libsystemd/sd-bus/bus-message.c |
315 | @@ -20,6 +20,7 @@ | 386 | @@ -19,6 +19,7 @@ |
316 | #include "strv.h" | 387 | #include "strv.h" |
317 | #include "time-util.h" | 388 | #include "time-util.h" |
318 | #include "utf8.h" | 389 | #include "utf8.h" |
319 | +#include "missing_stdlib.h" | 390 | +#include "missing_stdlib.h" |
320 | 391 | ||
321 | static int message_append_basic(sd_bus_message *m, char type, const void *p, const void **stored); | 392 | static int message_append_basic(sd_bus_message *m, char type, const void *p, const void **stored); |
322 | 393 | static int message_parse_fields(sd_bus_message *m); | |
394 | diff --git a/src/libsystemd/sd-bus/bus-objects.c b/src/libsystemd/sd-bus/bus-objects.c | ||
395 | index 2ad7a9993d..bba72f99f4 100644 | ||
323 | --- a/src/libsystemd/sd-bus/bus-objects.c | 396 | --- a/src/libsystemd/sd-bus/bus-objects.c |
324 | +++ b/src/libsystemd/sd-bus/bus-objects.c | 397 | +++ b/src/libsystemd/sd-bus/bus-objects.c |
325 | @@ -11,6 +11,7 @@ | 398 | @@ -11,6 +11,7 @@ |
@@ -330,6 +403,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
330 | 403 | ||
331 | static int node_vtable_get_userdata( | 404 | static int node_vtable_get_userdata( |
332 | sd_bus *bus, | 405 | sd_bus *bus, |
406 | diff --git a/src/libsystemd/sd-bus/bus-socket.c b/src/libsystemd/sd-bus/bus-socket.c | ||
407 | index 64037e4fe0..9b9ce0aaa9 100644 | ||
333 | --- a/src/libsystemd/sd-bus/bus-socket.c | 408 | --- a/src/libsystemd/sd-bus/bus-socket.c |
334 | +++ b/src/libsystemd/sd-bus/bus-socket.c | 409 | +++ b/src/libsystemd/sd-bus/bus-socket.c |
335 | @@ -28,6 +28,7 @@ | 410 | @@ -28,6 +28,7 @@ |
@@ -340,9 +415,11 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
340 | 415 | ||
341 | #define SNDBUF_SIZE (8*1024*1024) | 416 | #define SNDBUF_SIZE (8*1024*1024) |
342 | 417 | ||
418 | diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c | ||
419 | index f6a5e4aa06..b36faa79a3 100644 | ||
343 | --- a/src/libsystemd/sd-bus/sd-bus.c | 420 | --- a/src/libsystemd/sd-bus/sd-bus.c |
344 | +++ b/src/libsystemd/sd-bus/sd-bus.c | 421 | +++ b/src/libsystemd/sd-bus/sd-bus.c |
345 | @@ -43,6 +43,7 @@ | 422 | @@ -46,6 +46,7 @@ |
346 | #include "string-util.h" | 423 | #include "string-util.h" |
347 | #include "strv.h" | 424 | #include "strv.h" |
348 | #include "user-util.h" | 425 | #include "user-util.h" |
@@ -350,39 +427,35 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
350 | 427 | ||
351 | #define log_debug_bus_message(m) \ | 428 | #define log_debug_bus_message(m) \ |
352 | do { \ | 429 | do { \ |
430 | diff --git a/src/libsystemd/sd-bus/test-bus-benchmark.c b/src/libsystemd/sd-bus/test-bus-benchmark.c | ||
431 | index 1eb6edd329..d434a3c178 100644 | ||
353 | --- a/src/libsystemd/sd-bus/test-bus-benchmark.c | 432 | --- a/src/libsystemd/sd-bus/test-bus-benchmark.c |
354 | +++ b/src/libsystemd/sd-bus/test-bus-benchmark.c | 433 | +++ b/src/libsystemd/sd-bus/test-bus-benchmark.c |
355 | @@ -14,6 +14,7 @@ | 434 | @@ -13,6 +13,7 @@ |
435 | #include "missing_resource.h" | ||
356 | #include "string-util.h" | 436 | #include "string-util.h" |
357 | #include "time-util.h" | 437 | #include "time-util.h" |
358 | #include "util.h" | ||
359 | +#include "missing_stdlib.h" | 438 | +#include "missing_stdlib.h" |
360 | 439 | ||
361 | #define MAX_SIZE (2*1024*1024) | 440 | #define MAX_SIZE (2*1024*1024) |
362 | 441 | ||
442 | diff --git a/src/libsystemd/sd-journal/sd-journal.c b/src/libsystemd/sd-journal/sd-journal.c | ||
443 | index 9947947ef2..8dc6f93159 100644 | ||
363 | --- a/src/libsystemd/sd-journal/sd-journal.c | 444 | --- a/src/libsystemd/sd-journal/sd-journal.c |
364 | +++ b/src/libsystemd/sd-journal/sd-journal.c | 445 | +++ b/src/libsystemd/sd-journal/sd-journal.c |
365 | @@ -41,6 +41,7 @@ | 446 | @@ -44,6 +44,7 @@ |
366 | #include "string-util.h" | ||
367 | #include "strv.h" | 447 | #include "strv.h" |
368 | #include "syslog-util.h" | 448 | #include "syslog-util.h" |
449 | #include "uid-alloc-range.h" | ||
369 | +#include "missing_stdlib.h" | 450 | +#include "missing_stdlib.h" |
370 | 451 | ||
371 | #define JOURNAL_FILES_MAX 7168 | 452 | #define JOURNAL_FILES_RECHECK_USEC (2 * USEC_PER_SEC) |
372 | |||
373 | --- a/src/locale/keymap-util.c | ||
374 | +++ b/src/locale/keymap-util.c | ||
375 | @@ -24,6 +24,7 @@ | ||
376 | #include "string-util.h" | ||
377 | #include "strv.h" | ||
378 | #include "tmpfile-util.h" | ||
379 | +#include "missing_stdlib.h" | ||
380 | 453 | ||
381 | static bool startswith_comma(const char *s, const char *prefix) { | 454 | diff --git a/src/login/pam_systemd.c b/src/login/pam_systemd.c |
382 | s = startswith(s, prefix); | 455 | index ba2fca32c6..e1f9caa13b 100644 |
383 | --- a/src/login/pam_systemd.c | 456 | --- a/src/login/pam_systemd.c |
384 | +++ b/src/login/pam_systemd.c | 457 | +++ b/src/login/pam_systemd.c |
385 | @@ -31,6 +31,7 @@ | 458 | @@ -34,6 +34,7 @@ |
386 | #include "locale-util.h" | 459 | #include "locale-util.h" |
387 | #include "login-util.h" | 460 | #include "login-util.h" |
388 | #include "macro.h" | 461 | #include "macro.h" |
@@ -390,9 +463,11 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
390 | #include "pam-util.h" | 463 | #include "pam-util.h" |
391 | #include "parse-util.h" | 464 | #include "parse-util.h" |
392 | #include "path-util.h" | 465 | #include "path-util.h" |
466 | diff --git a/src/network/generator/network-generator.c b/src/network/generator/network-generator.c | ||
467 | index 1090934bfc..69a77f66e2 100644 | ||
393 | --- a/src/network/generator/network-generator.c | 468 | --- a/src/network/generator/network-generator.c |
394 | +++ b/src/network/generator/network-generator.c | 469 | +++ b/src/network/generator/network-generator.c |
395 | @@ -13,6 +13,7 @@ | 470 | @@ -14,6 +14,7 @@ |
396 | #include "string-table.h" | 471 | #include "string-table.h" |
397 | #include "string-util.h" | 472 | #include "string-util.h" |
398 | #include "strv.h" | 473 | #include "strv.h" |
@@ -400,16 +475,20 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
400 | 475 | ||
401 | /* | 476 | /* |
402 | # .network | 477 | # .network |
478 | diff --git a/src/nspawn/nspawn-settings.c b/src/nspawn/nspawn-settings.c | ||
479 | index 05bde1c756..aa29587868 100644 | ||
403 | --- a/src/nspawn/nspawn-settings.c | 480 | --- a/src/nspawn/nspawn-settings.c |
404 | +++ b/src/nspawn/nspawn-settings.c | 481 | +++ b/src/nspawn/nspawn-settings.c |
405 | @@ -17,6 +17,7 @@ | 482 | @@ -16,6 +16,7 @@ |
483 | #include "string-util.h" | ||
406 | #include "strv.h" | 484 | #include "strv.h" |
407 | #include "user-util.h" | 485 | #include "user-util.h" |
408 | #include "util.h" | ||
409 | +#include "missing_stdlib.h" | 486 | +#include "missing_stdlib.h" |
410 | 487 | ||
411 | Settings *settings_new(void) { | 488 | Settings *settings_new(void) { |
412 | Settings *s; | 489 | Settings *s; |
490 | diff --git a/src/nss-mymachines/nss-mymachines.c b/src/nss-mymachines/nss-mymachines.c | ||
491 | index c64e79bdff..eda26b0b9a 100644 | ||
413 | --- a/src/nss-mymachines/nss-mymachines.c | 492 | --- a/src/nss-mymachines/nss-mymachines.c |
414 | +++ b/src/nss-mymachines/nss-mymachines.c | 493 | +++ b/src/nss-mymachines/nss-mymachines.c |
415 | @@ -21,6 +21,7 @@ | 494 | @@ -21,6 +21,7 @@ |
@@ -420,9 +499,11 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
420 | 499 | ||
421 | static void setup_logging_once(void) { | 500 | static void setup_logging_once(void) { |
422 | static pthread_once_t once = PTHREAD_ONCE_INIT; | 501 | static pthread_once_t once = PTHREAD_ONCE_INIT; |
502 | diff --git a/src/portable/portable.c b/src/portable/portable.c | ||
503 | index 7811833fac..c6414da91c 100644 | ||
423 | --- a/src/portable/portable.c | 504 | --- a/src/portable/portable.c |
424 | +++ b/src/portable/portable.c | 505 | +++ b/src/portable/portable.c |
425 | @@ -39,6 +39,7 @@ | 506 | @@ -40,6 +40,7 @@ |
426 | #include "strv.h" | 507 | #include "strv.h" |
427 | #include "tmpfile-util.h" | 508 | #include "tmpfile-util.h" |
428 | #include "user-util.h" | 509 | #include "user-util.h" |
@@ -430,16 +511,20 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
430 | 511 | ||
431 | /* Markers used in the first line of our 20-portable.conf unit file drop-in to determine, that a) the unit file was | 512 | /* Markers used in the first line of our 20-portable.conf unit file drop-in to determine, that a) the unit file was |
432 | * dropped there by the portable service logic and b) for which image it was dropped there. */ | 513 | * dropped there by the portable service logic and b) for which image it was dropped there. */ |
514 | diff --git a/src/resolve/resolvectl.c b/src/resolve/resolvectl.c | ||
515 | index 2638e985fb..82c903fd66 100644 | ||
433 | --- a/src/resolve/resolvectl.c | 516 | --- a/src/resolve/resolvectl.c |
434 | +++ b/src/resolve/resolvectl.c | 517 | +++ b/src/resolve/resolvectl.c |
435 | @@ -43,6 +43,7 @@ | 518 | @@ -48,6 +48,7 @@ |
436 | #include "utf8.h" | 519 | #include "varlink.h" |
437 | #include "verb-log-control.h" | 520 | #include "verb-log-control.h" |
438 | #include "verbs.h" | 521 | #include "verbs.h" |
439 | +#include "missing_stdlib.h" | 522 | +#include "missing_stdlib.h" |
440 | 523 | ||
441 | static int arg_family = AF_UNSPEC; | 524 | static int arg_family = AF_UNSPEC; |
442 | static int arg_ifindex = 0; | 525 | static int arg_ifindex = 0; |
526 | diff --git a/src/shared/bus-get-properties.c b/src/shared/bus-get-properties.c | ||
527 | index 8b4f66b22e..5926e4c61b 100644 | ||
443 | --- a/src/shared/bus-get-properties.c | 528 | --- a/src/shared/bus-get-properties.c |
444 | +++ b/src/shared/bus-get-properties.c | 529 | +++ b/src/shared/bus-get-properties.c |
445 | @@ -4,6 +4,7 @@ | 530 | @@ -4,6 +4,7 @@ |
@@ -450,9 +535,11 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
450 | 535 | ||
451 | int bus_property_get_bool( | 536 | int bus_property_get_bool( |
452 | sd_bus *bus, | 537 | sd_bus *bus, |
538 | diff --git a/src/shared/bus-unit-procs.c b/src/shared/bus-unit-procs.c | ||
539 | index 8b462b5627..183ce1c18e 100644 | ||
453 | --- a/src/shared/bus-unit-procs.c | 540 | --- a/src/shared/bus-unit-procs.c |
454 | +++ b/src/shared/bus-unit-procs.c | 541 | +++ b/src/shared/bus-unit-procs.c |
455 | @@ -10,6 +10,7 @@ | 542 | @@ -11,6 +11,7 @@ |
456 | #include "sort-util.h" | 543 | #include "sort-util.h" |
457 | #include "string-util.h" | 544 | #include "string-util.h" |
458 | #include "terminal-util.h" | 545 | #include "terminal-util.h" |
@@ -460,9 +547,11 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
460 | 547 | ||
461 | struct CGroupInfo { | 548 | struct CGroupInfo { |
462 | char *cgroup_path; | 549 | char *cgroup_path; |
550 | diff --git a/src/shared/bus-unit-util.c b/src/shared/bus-unit-util.c | ||
551 | index 1e95e36678..640ee031d5 100644 | ||
463 | --- a/src/shared/bus-unit-util.c | 552 | --- a/src/shared/bus-unit-util.c |
464 | +++ b/src/shared/bus-unit-util.c | 553 | +++ b/src/shared/bus-unit-util.c |
465 | @@ -49,6 +49,7 @@ | 554 | @@ -51,6 +51,7 @@ |
466 | #include "unit-def.h" | 555 | #include "unit-def.h" |
467 | #include "user-util.h" | 556 | #include "user-util.h" |
468 | #include "utf8.h" | 557 | #include "utf8.h" |
@@ -470,19 +559,23 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
470 | 559 | ||
471 | int bus_parse_unit_info(sd_bus_message *message, UnitInfo *u) { | 560 | int bus_parse_unit_info(sd_bus_message *message, UnitInfo *u) { |
472 | assert(message); | 561 | assert(message); |
562 | diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c | ||
563 | index d09ec5148d..f38a8f7cc1 100644 | ||
473 | --- a/src/shared/bus-util.c | 564 | --- a/src/shared/bus-util.c |
474 | +++ b/src/shared/bus-util.c | 565 | +++ b/src/shared/bus-util.c |
475 | @@ -21,6 +21,7 @@ | 566 | @@ -24,6 +24,7 @@ |
476 | #include "path-util.h" | 567 | #include "path-util.h" |
477 | #include "socket-util.h" | 568 | #include "socket-util.h" |
478 | #include "stdio-util.h" | 569 | #include "stdio-util.h" |
479 | +#include "missing_stdlib.h" | 570 | +#include "missing_stdlib.h" |
480 | 571 | ||
481 | static int name_owner_change_callback(sd_bus_message *m, void *userdata, sd_bus_error *ret_error) { | 572 | static int name_owner_change_callback(sd_bus_message *m, void *userdata, sd_bus_error *ret_error) { |
482 | sd_event *e = userdata; | 573 | sd_event *e = ASSERT_PTR(userdata); |
574 | diff --git a/src/shared/dns-domain.c b/src/shared/dns-domain.c | ||
575 | index 620b156563..5ee5b09186 100644 | ||
483 | --- a/src/shared/dns-domain.c | 576 | --- a/src/shared/dns-domain.c |
484 | +++ b/src/shared/dns-domain.c | 577 | +++ b/src/shared/dns-domain.c |
485 | @@ -17,6 +17,7 @@ | 578 | @@ -18,6 +18,7 @@ |
486 | #include "string-util.h" | 579 | #include "string-util.h" |
487 | #include "strv.h" | 580 | #include "strv.h" |
488 | #include "utf8.h" | 581 | #include "utf8.h" |
@@ -490,56 +583,56 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
490 | 583 | ||
491 | int dns_label_unescape(const char **name, char *dest, size_t sz, DNSLabelFlags flags) { | 584 | int dns_label_unescape(const char **name, char *dest, size_t sz, DNSLabelFlags flags) { |
492 | const char *n; | 585 | const char *n; |
586 | diff --git a/src/shared/journal-importer.c b/src/shared/journal-importer.c | ||
587 | index d9eabec886..534c6cf7e3 100644 | ||
493 | --- a/src/shared/journal-importer.c | 588 | --- a/src/shared/journal-importer.c |
494 | +++ b/src/shared/journal-importer.c | 589 | +++ b/src/shared/journal-importer.c |
495 | @@ -15,6 +15,7 @@ | 590 | @@ -16,6 +16,7 @@ |
496 | #include "parse-util.h" | ||
497 | #include "string-util.h" | 591 | #include "string-util.h" |
592 | #include "strv.h" | ||
498 | #include "unaligned.h" | 593 | #include "unaligned.h" |
499 | +#include "missing_stdlib.h" | 594 | +#include "missing_stdlib.h" |
500 | 595 | ||
501 | enum { | 596 | enum { |
502 | IMPORTER_STATE_LINE = 0, /* waiting to read, or reading line */ | 597 | IMPORTER_STATE_LINE = 0, /* waiting to read, or reading line */ |
598 | diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c | ||
599 | index b72e516c8d..6e832b74c3 100644 | ||
503 | --- a/src/shared/logs-show.c | 600 | --- a/src/shared/logs-show.c |
504 | +++ b/src/shared/logs-show.c | 601 | +++ b/src/shared/logs-show.c |
505 | @@ -42,6 +42,7 @@ | 602 | @@ -41,6 +41,7 @@ |
603 | #include "time-util.h" | ||
506 | #include "utf8.h" | 604 | #include "utf8.h" |
507 | #include "util.h" | ||
508 | #include "web-util.h" | 605 | #include "web-util.h" |
509 | +#include "missing_stdlib.h" | 606 | +#include "missing_stdlib.h" |
510 | 607 | ||
511 | /* up to three lines (each up to 100 characters) or 300 characters, whichever is less */ | 608 | /* up to three lines (each up to 100 characters) or 300 characters, whichever is less */ |
512 | #define PRINT_LINE_THRESHOLD 3 | 609 | #define PRINT_LINE_THRESHOLD 3 |
610 | diff --git a/src/shared/pager.c b/src/shared/pager.c | ||
611 | index 6ed35a3ca9..99d9d36140 100644 | ||
513 | --- a/src/shared/pager.c | 612 | --- a/src/shared/pager.c |
514 | +++ b/src/shared/pager.c | 613 | +++ b/src/shared/pager.c |
515 | @@ -26,6 +26,7 @@ | 614 | @@ -25,6 +25,7 @@ |
615 | #include "string-util.h" | ||
516 | #include "strv.h" | 616 | #include "strv.h" |
517 | #include "terminal-util.h" | 617 | #include "terminal-util.h" |
518 | #include "util.h" | ||
519 | +#include "missing_stdlib.h" | 618 | +#include "missing_stdlib.h" |
520 | 619 | ||
521 | static pid_t pager_pid = 0; | 620 | static pid_t pager_pid = 0; |
522 | 621 | ||
523 | --- a/src/shared/uid-range.c | 622 | diff --git a/src/socket-proxy/socket-proxyd.c b/src/socket-proxy/socket-proxyd.c |
524 | +++ b/src/shared/uid-range.c | 623 | index 821049e667..08a5bdae3d 100644 |
525 | @@ -9,6 +9,7 @@ | ||
526 | #include "sort-util.h" | ||
527 | #include "uid-range.h" | ||
528 | #include "user-util.h" | ||
529 | +#include "missing_stdlib.h" | ||
530 | |||
531 | static bool uid_range_intersect(UidRange *range, uid_t start, uid_t nr) { | ||
532 | assert(range); | ||
533 | --- a/src/socket-proxy/socket-proxyd.c | 624 | --- a/src/socket-proxy/socket-proxyd.c |
534 | +++ b/src/socket-proxy/socket-proxyd.c | 625 | +++ b/src/socket-proxy/socket-proxyd.c |
535 | @@ -26,6 +26,7 @@ | 626 | @@ -27,6 +27,7 @@ |
627 | #include "set.h" | ||
536 | #include "socket-util.h" | 628 | #include "socket-util.h" |
537 | #include "string-util.h" | 629 | #include "string-util.h" |
538 | #include "util.h" | ||
539 | +#include "missing_stdlib.h" | 630 | +#include "missing_stdlib.h" |
540 | 631 | ||
541 | #define BUFFER_SIZE (256 * 1024) | 632 | #define BUFFER_SIZE (256 * 1024) |
542 | 633 | ||
634 | diff --git a/src/test/test-hexdecoct.c b/src/test/test-hexdecoct.c | ||
635 | index 9d71db6ae1..a9938c1e6e 100644 | ||
543 | --- a/src/test/test-hexdecoct.c | 636 | --- a/src/test/test-hexdecoct.c |
544 | +++ b/src/test/test-hexdecoct.c | 637 | +++ b/src/test/test-hexdecoct.c |
545 | @@ -7,6 +7,7 @@ | 638 | @@ -7,6 +7,7 @@ |
@@ -550,9 +643,11 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
550 | #include "tests.h" | 643 | #include "tests.h" |
551 | 644 | ||
552 | TEST(hexchar) { | 645 | TEST(hexchar) { |
646 | diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c | ||
647 | index 8e4d57ee72..6b4555b4d5 100644 | ||
553 | --- a/src/udev/udev-builtin-path_id.c | 648 | --- a/src/udev/udev-builtin-path_id.c |
554 | +++ b/src/udev/udev-builtin-path_id.c | 649 | +++ b/src/udev/udev-builtin-path_id.c |
555 | @@ -22,6 +22,7 @@ | 650 | @@ -24,6 +24,7 @@ |
556 | #include "sysexits.h" | 651 | #include "sysexits.h" |
557 | #include "udev-builtin.h" | 652 | #include "udev-builtin.h" |
558 | #include "udev-util.h" | 653 | #include "udev-util.h" |
@@ -560,9 +655,11 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
560 | 655 | ||
561 | _printf_(2,3) | 656 | _printf_(2,3) |
562 | static void path_prepend(char **path, const char *fmt, ...) { | 657 | static void path_prepend(char **path, const char *fmt, ...) { |
658 | diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c | ||
659 | index ec4ad30824..bc40303a46 100644 | ||
563 | --- a/src/udev/udev-event.c | 660 | --- a/src/udev/udev-event.c |
564 | +++ b/src/udev/udev-event.c | 661 | +++ b/src/udev/udev-event.c |
565 | @@ -35,6 +35,7 @@ | 662 | @@ -34,6 +34,7 @@ |
566 | #include "udev-util.h" | 663 | #include "udev-util.h" |
567 | #include "udev-watch.h" | 664 | #include "udev-watch.h" |
568 | #include "user-util.h" | 665 | #include "user-util.h" |
@@ -570,33 +667,18 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
570 | 667 | ||
571 | typedef struct Spawn { | 668 | typedef struct Spawn { |
572 | sd_device *device; | 669 | sd_device *device; |
670 | diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c | ||
671 | index 5bd09a64d1..0ce79f815c 100644 | ||
573 | --- a/src/udev/udev-rules.c | 672 | --- a/src/udev/udev-rules.c |
574 | +++ b/src/udev/udev-rules.c | 673 | +++ b/src/udev/udev-rules.c |
575 | @@ -34,6 +34,7 @@ | 674 | @@ -35,6 +35,7 @@ |
576 | #include "udev-util.h" | 675 | #include "udev-util.h" |
577 | #include "user-util.h" | 676 | #include "user-util.h" |
578 | #include "virt.h" | 677 | #include "virt.h" |
579 | +#include "missing_stdlib.h" | 678 | +#include "missing_stdlib.h" |
580 | 679 | ||
581 | #define RULES_DIRS (const char* const*) CONF_PATHS_STRV("udev/rules.d") | 680 | #define RULES_DIRS ((const char* const*) CONF_PATHS_STRV("udev/rules.d")) |
582 | 681 | ||
583 | --- a/src/core/dbus-cgroup.c | 682 | -- |
584 | +++ b/src/core/dbus-cgroup.c | 683 | 2.39.2 |
585 | @@ -21,6 +21,7 @@ | 684 | |
586 | #include "parse-util.h" | ||
587 | #include "path-util.h" | ||
588 | #include "percent-util.h" | ||
589 | +#include "missing_stdlib.h" | ||
590 | #include "socket-util.h" | ||
591 | |||
592 | BUS_DEFINE_PROPERTY_GET(bus_property_get_tasks_max, "t", TasksMax, tasks_max_resolve); | ||
593 | --- a/src/fstab-generator/fstab-generator.c | ||
594 | +++ b/src/fstab-generator/fstab-generator.c | ||
595 | @@ -29,6 +29,7 @@ | ||
596 | #include "util.h" | ||
597 | #include "virt.h" | ||
598 | #include "volatile-util.h" | ||
599 | +#include "missing_stdlib.h" | ||
600 | |||
601 | typedef enum MountPointFlags { | ||
602 | MOUNT_NOAUTO = 1 << 0, | ||
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch deleted file mode 100644 index 327084bae..000000000 --- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | From ad395dda5db9b1ae156be121cfc8a38960de6c55 Mon Sep 17 00:00:00 2001 | ||
2 | From: Chen Qi <Qi.Chen@windriver.com> | ||
3 | Date: Wed, 28 Feb 2018 21:25:22 -0800 | ||
4 | Subject: [PATCH] test-sizeof.c: Disable tests for missing typedefs in musl | ||
5 | |||
6 | Upstream-Status: Inappropriate [musl specific] | ||
7 | |||
8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
9 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
10 | |||
11 | --- | ||
12 | src/test/test-sizeof.c | 4 ++++ | ||
13 | 1 file changed, 4 insertions(+) | ||
14 | |||
15 | --- a/src/test/test-sizeof.c | ||
16 | +++ b/src/test/test-sizeof.c | ||
17 | @@ -55,8 +55,10 @@ int main(void) { | ||
18 | info(unsigned); | ||
19 | info(long unsigned); | ||
20 | info(long long unsigned); | ||
21 | +#ifdef __GLIBC__ | ||
22 | info(__syscall_ulong_t); | ||
23 | info(__syscall_slong_t); | ||
24 | +#endif | ||
25 | info(intmax_t); | ||
26 | info(uintmax_t); | ||
27 | |||
28 | @@ -76,7 +78,9 @@ int main(void) { | ||
29 | info(ssize_t); | ||
30 | info(time_t); | ||
31 | info(usec_t); | ||
32 | +#ifdef __GLIBC__ | ||
33 | info(__time_t); | ||
34 | +#endif | ||
35 | info(pid_t); | ||
36 | info(uid_t); | ||
37 | info(gid_t); | ||
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0012-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch index 846c01bd4..0d69e8e9c 100644 --- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch +++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0012-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From fb068403b25002156435350165ea418a6338a313 Mon Sep 17 00:00:00 2001 | 1 | From 747ff78ecda6afe01c7eab4d7c27aea6af810c86 Mon Sep 17 00:00:00 2001 |
2 | From: Chen Qi <Qi.Chen@windriver.com> | 2 | From: Chen Qi <Qi.Chen@windriver.com> |
3 | Date: Mon, 25 Feb 2019 14:56:21 +0800 | 3 | Date: Mon, 25 Feb 2019 14:56:21 +0800 |
4 | Subject: [PATCH] don't fail if GLOB_BRACE and GLOB_ALTDIRFUNC is not defined | 4 | Subject: [PATCH] don't fail if GLOB_BRACE and GLOB_ALTDIRFUNC is not defined |
@@ -16,13 +16,14 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
16 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | 16 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> |
17 | [rebased for systemd 243] | 17 | [rebased for systemd 243] |
18 | Signed-off-by: Scott Murray <scott.murray@konsulko.com> | 18 | Signed-off-by: Scott Murray <scott.murray@konsulko.com> |
19 | |||
20 | --- | 19 | --- |
21 | src/basic/glob-util.c | 12 ++++++++++++ | 20 | src/basic/glob-util.c | 12 ++++++++++++ |
22 | src/test/test-glob-util.c | 16 ++++++++++++++++ | 21 | src/test/test-glob-util.c | 16 ++++++++++++++++ |
23 | src/tmpfiles/tmpfiles.c | 10 ++++++++++ | 22 | src/tmpfiles/tmpfiles.c | 10 ++++++++++ |
24 | 3 files changed, 38 insertions(+) | 23 | 3 files changed, 38 insertions(+) |
25 | 24 | ||
25 | diff --git a/src/basic/glob-util.c b/src/basic/glob-util.c | ||
26 | index fd60a6eda2..c73edc41ea 100644 | ||
26 | --- a/src/basic/glob-util.c | 27 | --- a/src/basic/glob-util.c |
27 | +++ b/src/basic/glob-util.c | 28 | +++ b/src/basic/glob-util.c |
28 | @@ -12,6 +12,12 @@ | 29 | @@ -12,6 +12,12 @@ |
@@ -46,7 +47,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
46 | /* We want to set GLOB_ALTDIRFUNC ourselves, don't allow it to be set. */ | 47 | /* We want to set GLOB_ALTDIRFUNC ourselves, don't allow it to be set. */ |
47 | assert(!(flags & GLOB_ALTDIRFUNC)); | 48 | assert(!(flags & GLOB_ALTDIRFUNC)); |
48 | 49 | ||
49 | @@ -32,9 +39,14 @@ int safe_glob(const char *path, int flag | 50 | @@ -32,9 +39,14 @@ int safe_glob(const char *path, int flags, glob_t *pglob) { |
50 | pglob->gl_lstat = lstat; | 51 | pglob->gl_lstat = lstat; |
51 | if (!pglob->gl_stat) | 52 | if (!pglob->gl_stat) |
52 | pglob->gl_stat = stat; | 53 | pglob->gl_stat = stat; |
@@ -61,11 +62,13 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
61 | if (k == GLOB_NOMATCH) | 62 | if (k == GLOB_NOMATCH) |
62 | return -ENOENT; | 63 | return -ENOENT; |
63 | if (k == GLOB_NOSPACE) | 64 | if (k == GLOB_NOSPACE) |
65 | diff --git a/src/test/test-glob-util.c b/src/test/test-glob-util.c | ||
66 | index 9b3e73cce0..3790ba3be5 100644 | ||
64 | --- a/src/test/test-glob-util.c | 67 | --- a/src/test/test-glob-util.c |
65 | +++ b/src/test/test-glob-util.c | 68 | +++ b/src/test/test-glob-util.c |
66 | @@ -13,6 +13,12 @@ | 69 | @@ -34,6 +34,12 @@ TEST(glob_first) { |
67 | #include "tests.h" | 70 | assert_se(first == NULL); |
68 | #include "tmpfile-util.h" | 71 | } |
69 | 72 | ||
70 | +/* Don't fail if the standard library | 73 | +/* Don't fail if the standard library |
71 | + * doesn't provide brace expansion */ | 74 | + * doesn't provide brace expansion */ |
@@ -75,8 +78,8 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
75 | + | 78 | + |
76 | TEST(glob_exists) { | 79 | TEST(glob_exists) { |
77 | char name[] = "/tmp/test-glob_exists.XXXXXX"; | 80 | char name[] = "/tmp/test-glob_exists.XXXXXX"; |
78 | int fd = -1; | 81 | int fd = -EBADF; |
79 | @@ -40,11 +46,13 @@ TEST(glob_no_dot) { | 82 | @@ -61,11 +67,13 @@ TEST(glob_no_dot) { |
80 | const char *fn; | 83 | const char *fn; |
81 | 84 | ||
82 | _cleanup_globfree_ glob_t g = { | 85 | _cleanup_globfree_ glob_t g = { |
@@ -90,7 +93,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
90 | }; | 93 | }; |
91 | 94 | ||
92 | int r; | 95 | int r; |
93 | @@ -52,11 +60,19 @@ TEST(glob_no_dot) { | 96 | @@ -73,11 +81,19 @@ TEST(glob_no_dot) { |
94 | assert_se(mkdtemp(template)); | 97 | assert_se(mkdtemp(template)); |
95 | 98 | ||
96 | fn = strjoina(template, "/*"); | 99 | fn = strjoina(template, "/*"); |
@@ -110,11 +113,13 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
110 | assert_se(r == GLOB_NOMATCH); | 113 | assert_se(r == GLOB_NOMATCH); |
111 | 114 | ||
112 | (void) rm_rf(template, REMOVE_ROOT|REMOVE_PHYSICAL); | 115 | (void) rm_rf(template, REMOVE_ROOT|REMOVE_PHYSICAL); |
116 | diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c | ||
117 | index 458aed7054..2cf24b38c0 100644 | ||
113 | --- a/src/tmpfiles/tmpfiles.c | 118 | --- a/src/tmpfiles/tmpfiles.c |
114 | +++ b/src/tmpfiles/tmpfiles.c | 119 | +++ b/src/tmpfiles/tmpfiles.c |
115 | @@ -67,6 +67,12 @@ | 120 | @@ -73,6 +73,12 @@ |
116 | #include "umask-util.h" | ||
117 | #include "user-util.h" | 121 | #include "user-util.h" |
122 | #include "virt.h" | ||
118 | 123 | ||
119 | +/* Don't fail if the standard library | 124 | +/* Don't fail if the standard library |
120 | + * doesn't provide brace expansion */ | 125 | + * doesn't provide brace expansion */ |
@@ -125,7 +130,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
125 | /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates | 130 | /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates |
126 | * them in the file system. This is intended to be used to create | 131 | * them in the file system. This is intended to be used to create |
127 | * properly owned directories beneath /tmp, /var/tmp, /run, which are | 132 | * properly owned directories beneath /tmp, /var/tmp, /run, which are |
128 | @@ -1961,7 +1967,9 @@ finish: | 133 | @@ -2355,7 +2361,9 @@ finish: |
129 | 134 | ||
130 | static int glob_item(Item *i, action_t action) { | 135 | static int glob_item(Item *i, action_t action) { |
131 | _cleanup_globfree_ glob_t g = { | 136 | _cleanup_globfree_ glob_t g = { |
@@ -134,8 +139,8 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
134 | +#endif | 139 | +#endif |
135 | }; | 140 | }; |
136 | int r = 0, k; | 141 | int r = 0, k; |
137 | char **fn; | 142 | |
138 | @@ -1981,7 +1989,9 @@ static int glob_item(Item *i, action_t a | 143 | @@ -2375,7 +2383,9 @@ static int glob_item(Item *i, action_t action) { |
139 | 144 | ||
140 | static int glob_item_recursively(Item *i, fdaction_t action) { | 145 | static int glob_item_recursively(Item *i, fdaction_t action) { |
141 | _cleanup_globfree_ glob_t g = { | 146 | _cleanup_globfree_ glob_t g = { |
@@ -144,4 +149,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
144 | +#endif | 149 | +#endif |
145 | }; | 150 | }; |
146 | int r = 0, k; | 151 | int r = 0, k; |
147 | char **fn; | 152 | |
153 | -- | ||
154 | 2.39.2 | ||
155 | |||
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0013-add-missing-FTW_-macros-for-musl.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0013-add-missing-FTW_-macros-for-musl.patch new file mode 100644 index 000000000..d6aaadc00 --- /dev/null +++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0013-add-missing-FTW_-macros-for-musl.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | From efd7b41cf270c7b07ee3b9aec0fedd8e52dd422f Mon Sep 17 00:00:00 2001 | ||
2 | From: Chen Qi <Qi.Chen@windriver.com> | ||
3 | Date: Mon, 25 Feb 2019 15:00:06 +0800 | ||
4 | Subject: [PATCH] add missing FTW_ macros for musl | ||
5 | |||
6 | This is to avoid build failures like below for musl. | ||
7 | |||
8 | locale-util.c:296:24: error: 'FTW_STOP' undeclared | ||
9 | |||
10 | Upstream-Status: Inappropriate [musl specific] | ||
11 | |||
12 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
13 | --- | ||
14 | src/basic/missing_type.h | 4 ++++ | ||
15 | src/test/test-recurse-dir.c | 1 + | ||
16 | 2 files changed, 5 insertions(+) | ||
17 | |||
18 | diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h | ||
19 | index 6c0456349d..73a5b90e3c 100644 | ||
20 | --- a/src/basic/missing_type.h | ||
21 | +++ b/src/basic/missing_type.h | ||
22 | @@ -14,3 +14,7 @@ | ||
23 | #ifndef __GLIBC__ | ||
24 | typedef int (*comparison_fn_t)(const void *, const void *); | ||
25 | #endif | ||
26 | + | ||
27 | +#ifndef FTW_CONTINUE | ||
28 | +#define FTW_CONTINUE 0 | ||
29 | +#endif | ||
30 | diff --git a/src/test/test-recurse-dir.c b/src/test/test-recurse-dir.c | ||
31 | index 2c2120b136..bc60a178a2 100644 | ||
32 | --- a/src/test/test-recurse-dir.c | ||
33 | +++ b/src/test/test-recurse-dir.c | ||
34 | @@ -6,6 +6,7 @@ | ||
35 | #include "recurse-dir.h" | ||
36 | #include "strv.h" | ||
37 | #include "tests.h" | ||
38 | +#include "missing_type.h" | ||
39 | |||
40 | static char **list_nftw = NULL; | ||
41 | |||
42 | -- | ||
43 | 2.39.2 | ||
44 | |||
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0010-Use-uintmax_t-for-handling-rlim_t.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0014-Use-uintmax_t-for-handling-rlim_t.patch index 029f413aa..2071f4fb2 100644 --- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0010-Use-uintmax_t-for-handling-rlim_t.patch +++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0014-Use-uintmax_t-for-handling-rlim_t.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 856010e268a6aca8e5f02502457afe289bd877f1 Mon Sep 17 00:00:00 2001 | 1 | From 60f7d2c62bc3718023df93c01688d3ee1625d64d Mon Sep 17 00:00:00 2001 |
2 | From: Chen Qi <Qi.Chen@windriver.com> | 2 | From: Chen Qi <Qi.Chen@windriver.com> |
3 | Date: Mon, 25 Feb 2019 15:12:41 +0800 | 3 | Date: Mon, 25 Feb 2019 15:12:41 +0800 |
4 | Subject: [PATCH] Use uintmax_t for handling rlim_t | 4 | Subject: [PATCH] Use uintmax_t for handling rlim_t |
@@ -20,7 +20,6 @@ Upstream-Status: Denied [https://github.com/systemd/systemd/pull/7199] | |||
20 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 20 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
21 | [Rebased for v241] | 21 | [Rebased for v241] |
22 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | 22 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> |
23 | |||
24 | --- | 23 | --- |
25 | src/basic/format-util.h | 8 +------- | 24 | src/basic/format-util.h | 8 +------- |
26 | src/basic/rlimit-util.c | 12 ++++++------ | 25 | src/basic/rlimit-util.c | 12 ++++++------ |
@@ -73,9 +72,9 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | |||
73 | if (r < 0) | 72 | if (r < 0) |
74 | return -ENOMEM; | 73 | return -ENOMEM; |
75 | 74 | ||
76 | @@ -403,7 +403,7 @@ int rlimit_nofile_safe(void) { | 75 | @@ -407,7 +407,7 @@ int rlimit_nofile_safe(void) { |
77 | 76 | rl.rlim_max = MIN(rl.rlim_max, (rlim_t) read_nr_open()); | |
78 | rl.rlim_cur = FD_SETSIZE; | 77 | rl.rlim_cur = MIN((rlim_t) FD_SETSIZE, rl.rlim_max); |
79 | if (setrlimit(RLIMIT_NOFILE, &rl) < 0) | 78 | if (setrlimit(RLIMIT_NOFILE, &rl) < 0) |
80 | - return log_debug_errno(errno, "Failed to lower RLIMIT_NOFILE's soft limit to " RLIM_FMT ": %m", rl.rlim_cur); | 79 | - return log_debug_errno(errno, "Failed to lower RLIMIT_NOFILE's soft limit to " RLIM_FMT ": %m", rl.rlim_cur); |
81 | + return log_debug_errno(errno, "Failed to lower RLIMIT_NOFILE's soft limit to " RLIM_FMT ": %m", (uintmax_t)rl.rlim_cur); | 80 | + return log_debug_errno(errno, "Failed to lower RLIMIT_NOFILE's soft limit to " RLIM_FMT ": %m", (uintmax_t)rl.rlim_cur); |
@@ -84,7 +83,7 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | |||
84 | } | 83 | } |
85 | --- a/src/core/execute.c | 84 | --- a/src/core/execute.c |
86 | +++ b/src/core/execute.c | 85 | +++ b/src/core/execute.c |
87 | @@ -5639,9 +5639,9 @@ void exec_context_dump(const ExecContext | 86 | @@ -6707,9 +6707,9 @@ void exec_context_dump(const ExecContext |
88 | for (unsigned i = 0; i < RLIM_NLIMITS; i++) | 87 | for (unsigned i = 0; i < RLIM_NLIMITS; i++) |
89 | if (c->rlimit[i]) { | 88 | if (c->rlimit[i]) { |
90 | fprintf(f, "%sLimit%s: " RLIM_FMT "\n", | 89 | fprintf(f, "%sLimit%s: " RLIM_FMT "\n", |
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0016-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0016-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch deleted file mode 100644 index e6507c5f8..000000000 --- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0016-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | From e7441559266074e7a33e3c11ff5cdaf5ba9c0e24 Mon Sep 17 00:00:00 2001 | ||
2 | From: Chen Qi <Qi.Chen@windriver.com> | ||
3 | Date: Mon, 25 Feb 2019 15:18:00 +0800 | ||
4 | Subject: [PATCH] Hide __start_BUS_ERROR_MAP and __stop_BUS_ERROR_MAP | ||
5 | |||
6 | for currently unknown reasons they get exported to the shared libries | ||
7 | even without being listed in the sym file | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | |||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | [Rebased for v241] | ||
13 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
14 | |||
15 | --- | ||
16 | src/libsystemd/sd-bus/bus-error.c | 4 ++-- | ||
17 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
18 | |||
19 | diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c | ||
20 | index c49be29e46..90731bd7e7 100644 | ||
21 | --- a/src/libsystemd/sd-bus/bus-error.c | ||
22 | +++ b/src/libsystemd/sd-bus/bus-error.c | ||
23 | @@ -55,8 +55,8 @@ BUS_ERROR_MAP_ELF_REGISTER const sd_bus_error_map bus_standard_errors[] = { | ||
24 | }; | ||
25 | |||
26 | /* GCC maps this magically to the beginning and end of the BUS_ERROR_MAP section */ | ||
27 | -extern const sd_bus_error_map __start_SYSTEMD_BUS_ERROR_MAP[]; | ||
28 | -extern const sd_bus_error_map __stop_SYSTEMD_BUS_ERROR_MAP[]; | ||
29 | +extern const sd_bus_error_map __start_SYSTEMD_BUS_ERROR_MAP[] _hidden_; | ||
30 | +extern const sd_bus_error_map __stop_SYSTEMD_BUS_ERROR_MAP[] _hidden_; | ||
31 | |||
32 | /* Additional maps registered with sd_bus_error_add_map() are in this | ||
33 | * NULL terminated array */ | ||
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0016-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch index 0026a7b72..543fba7cd 100644 --- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch +++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0016-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 5d4c6b2f4b88b69b31f967371d2a6136c65dc3fd Mon Sep 17 00:00:00 2001 | 1 | From 26b02348e39fe72b73dd61bba8a0cefb0352717d Mon Sep 17 00:00:00 2001 |
2 | From: Andre McCurdy <armccurdy@gmail.com> | 2 | From: Andre McCurdy <armccurdy@gmail.com> |
3 | Date: Tue, 10 Oct 2017 14:33:30 -0700 | 3 | Date: Tue, 10 Oct 2017 14:33:30 -0700 |
4 | Subject: [PATCH] don't pass AT_SYMLINK_NOFOLLOW flag to faccessat() | 4 | Subject: [PATCH] don't pass AT_SYMLINK_NOFOLLOW flag to faccessat() |
@@ -25,15 +25,16 @@ just historical and not actually necessary or desired behaviour? | |||
25 | Upstream-Status: Inappropriate [musl specific] | 25 | Upstream-Status: Inappropriate [musl specific] |
26 | 26 | ||
27 | Signed-off-by: Andre McCurdy <armccurdy@gmail.com> | 27 | Signed-off-by: Andre McCurdy <armccurdy@gmail.com> |
28 | |||
29 | --- | 28 | --- |
30 | src/basic/fs-util.h | 23 +++++++++++++++++++++-- | 29 | src/basic/fs-util.h | 21 ++++++++++++++++++++- |
31 | src/shared/base-filesystem.c | 6 +++--- | 30 | src/shared/base-filesystem.c | 6 +++--- |
32 | 2 files changed, 24 insertions(+), 5 deletions(-) | 31 | 2 files changed, 23 insertions(+), 4 deletions(-) |
33 | 32 | ||
33 | diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h | ||
34 | index 932d003f19..33215dbf5f 100644 | ||
34 | --- a/src/basic/fs-util.h | 35 | --- a/src/basic/fs-util.h |
35 | +++ b/src/basic/fs-util.h | 36 | +++ b/src/basic/fs-util.h |
36 | @@ -46,8 +46,27 @@ int futimens_opath(int fd, const struct | 37 | @@ -49,8 +49,27 @@ int futimens_opath(int fd, const struct timespec ts[2]); |
37 | int fd_warn_permissions(const char *path, int fd); | 38 | int fd_warn_permissions(const char *path, int fd); |
38 | int stat_warn_permissions(const char *path, const struct stat *st); | 39 | int stat_warn_permissions(const char *path, const struct stat *st); |
39 | 40 | ||
@@ -61,19 +62,21 @@ Signed-off-by: Andre McCurdy <armccurdy@gmail.com> | |||
61 | + RET_NERRNO(faccessat(AT_FDCWD, (path), (mode), 0)) | 62 | + RET_NERRNO(faccessat(AT_FDCWD, (path), (mode), 0)) |
62 | 63 | ||
63 | int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gid, mode_t mode); | 64 | int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gid, mode_t mode); |
64 | int touch(const char *path); | 65 | |
66 | diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c | ||
67 | index be6dd1654a..2726dc946a 100644 | ||
65 | --- a/src/shared/base-filesystem.c | 68 | --- a/src/shared/base-filesystem.c |
66 | +++ b/src/shared/base-filesystem.c | 69 | +++ b/src/shared/base-filesystem.c |
67 | @@ -117,7 +117,7 @@ int base_filesystem_create(const char *r | 70 | @@ -145,7 +145,7 @@ int base_filesystem_create_fd(int fd, const char *root, uid_t uid, gid_t gid) { |
68 | return log_error_errno(errno, "Failed to open root file system: %m"); | 71 | /* The "root" parameter is decoration only – it's only used as part of log messages */ |
69 | 72 | ||
70 | for (size_t i = 0; i < ELEMENTSOF(table); i++) { | 73 | for (size_t i = 0; i < ELEMENTSOF(table); i++) { |
71 | - if (faccessat(fd, table[i].dir, F_OK, AT_SYMLINK_NOFOLLOW) >= 0) | 74 | - if (faccessat(fd, table[i].dir, F_OK, AT_SYMLINK_NOFOLLOW) >= 0) |
72 | + if (faccessat(fd, table[i].dir, F_OK, 0) >= 0) | 75 | + if (faccessat(fd, table[i].dir, F_OK, 0) >= 0) |
73 | continue; | 76 | continue; |
74 | 77 | ||
75 | if (table[i].target) { | 78 | if (table[i].target) { /* Create as symlink? */ |
76 | @@ -125,7 +125,7 @@ int base_filesystem_create(const char *r | 79 | @@ -153,7 +153,7 @@ int base_filesystem_create_fd(int fd, const char *root, uid_t uid, gid_t gid) { |
77 | 80 | ||
78 | /* check if one of the targets exists */ | 81 | /* check if one of the targets exists */ |
79 | NULSTR_FOREACH(s, table[i].target) { | 82 | NULSTR_FOREACH(s, table[i].target) { |
@@ -82,7 +85,7 @@ Signed-off-by: Andre McCurdy <armccurdy@gmail.com> | |||
82 | continue; | 85 | continue; |
83 | 86 | ||
84 | /* check if a specific file exists at the target path */ | 87 | /* check if a specific file exists at the target path */ |
85 | @@ -136,7 +136,7 @@ int base_filesystem_create(const char *r | 88 | @@ -164,7 +164,7 @@ int base_filesystem_create_fd(int fd, const char *root, uid_t uid, gid_t gid) { |
86 | if (!p) | 89 | if (!p) |
87 | return log_oom(); | 90 | return log_oom(); |
88 | 91 | ||
@@ -91,3 +94,6 @@ Signed-off-by: Andre McCurdy <armccurdy@gmail.com> | |||
91 | continue; | 94 | continue; |
92 | } | 95 | } |
93 | 96 | ||
97 | -- | ||
98 | 2.39.2 | ||
99 | |||
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0017-Define-glibc-compatible-basename-for-non-glibc-syste.patch index 612a535d3..7d74cfcc2 100644 --- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch +++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0017-Define-glibc-compatible-basename-for-non-glibc-syste.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 1803ea271b93370fdcf7ec497277344f1e775429 Mon Sep 17 00:00:00 2001 | 1 | From fdc7fb940bb41020271b9db41d5608004efdbde5 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Sun, 27 May 2018 08:36:44 -0700 | 3 | Date: Sun, 27 May 2018 08:36:44 -0700 |
4 | Subject: [PATCH] Define glibc compatible basename() for non-glibc systems | 4 | Subject: [PATCH] Define glibc compatible basename() for non-glibc systems |
@@ -9,16 +9,17 @@ using non-posix basename implementation, we have a way out | |||
9 | Upstream-Status: Inappropriate [musl specific] | 9 | Upstream-Status: Inappropriate [musl specific] |
10 | 10 | ||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
12 | |||
13 | --- | 12 | --- |
14 | src/machine/machine-dbus.c | 5 +++++ | 13 | src/machine/machine-dbus.c | 5 +++++ |
15 | 1 file changed, 5 insertions(+) | 14 | 1 file changed, 5 insertions(+) |
16 | 15 | ||
16 | diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c | ||
17 | index 45bc056326..aee51d5da5 100644 | ||
17 | --- a/src/machine/machine-dbus.c | 18 | --- a/src/machine/machine-dbus.c |
18 | +++ b/src/machine/machine-dbus.c | 19 | +++ b/src/machine/machine-dbus.c |
19 | @@ -10,6 +10,11 @@ | 20 | @@ -4,6 +4,11 @@ |
20 | #include <libgen.h> | 21 | #include <sys/mount.h> |
21 | #undef basename | 22 | #include <sys/wait.h> |
22 | 23 | ||
23 | +#if !defined(__GLIBC__) | 24 | +#if !defined(__GLIBC__) |
24 | +#include <string.h> | 25 | +#include <string.h> |
@@ -28,3 +29,6 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
28 | #include "alloc-util.h" | 29 | #include "alloc-util.h" |
29 | #include "bus-common-errors.h" | 30 | #include "bus-common-errors.h" |
30 | #include "bus-get-properties.h" | 31 | #include "bus-get-properties.h" |
32 | -- | ||
33 | 2.39.2 | ||
34 | |||
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0017-missing_type.h-add-__compar_d_fn_t-definition.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0017-missing_type.h-add-__compar_d_fn_t-definition.patch deleted file mode 100644 index eeff693bc..000000000 --- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0017-missing_type.h-add-__compar_d_fn_t-definition.patch +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | From 64f4d2eb976b9f23ce85b3655a876f7299eafd58 Mon Sep 17 00:00:00 2001 | ||
2 | From: Chen Qi <Qi.Chen@windriver.com> | ||
3 | Date: Mon, 25 Feb 2019 15:27:54 +0800 | ||
4 | Subject: [PATCH] missing_type.h: add __compar_d_fn_t definition | ||
5 | |||
6 | Fix the following compile failure: | ||
7 | src/basic/util.h:71:18: error: unknown type name '__compar_d_fn_t'; did you mean '__compar_fn_t'? | ||
8 | |||
9 | Upstream-Status: Inappropriate [musl specific] | ||
10 | |||
11 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
12 | |||
13 | --- | ||
14 | src/basic/missing_type.h | 1 + | ||
15 | 1 file changed, 1 insertion(+) | ||
16 | |||
17 | diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h | ||
18 | index 3df1084ef2..697aa7f58a 100644 | ||
19 | --- a/src/basic/missing_type.h | ||
20 | +++ b/src/basic/missing_type.h | ||
21 | @@ -13,6 +13,7 @@ | ||
22 | |||
23 | #ifndef __GLIBC__ | ||
24 | typedef int (*comparison_fn_t)(const void *, const void *); | ||
25 | +typedef int (*__compar_d_fn_t) (const void *, const void *, void *); | ||
26 | #endif | ||
27 | |||
28 | #ifndef __COMPAR_FN_T | ||
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0018-Do-not-disable-buffering-when-writing-to-oom_score_a.patch index baf490380..8162bc2c5 100644 --- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch +++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0018-Do-not-disable-buffering-when-writing-to-oom_score_a.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 30b08f76ea7f5c324afedf97f0867b76dac9f128 Mon Sep 17 00:00:00 2001 | 1 | From 32fd0dc67b6df531f0769dbb099dbe8f30c28514 Mon Sep 17 00:00:00 2001 |
2 | From: Chen Qi <Qi.Chen@windriver.com> | 2 | From: Chen Qi <Qi.Chen@windriver.com> |
3 | Date: Wed, 4 Jul 2018 15:00:44 +0800 | 3 | Date: Wed, 4 Jul 2018 15:00:44 +0800 |
4 | Subject: [PATCH] Do not disable buffering when writing to oom_score_adj | 4 | Subject: [PATCH] Do not disable buffering when writing to oom_score_adj |
@@ -19,14 +19,15 @@ Upstream-Status: Inappropriate [musl specific] | |||
19 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | 19 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> |
20 | [rebased for systemd 243] | 20 | [rebased for systemd 243] |
21 | Signed-off-by: Scott Murray <scott.murray@konsulko.com> | 21 | Signed-off-by: Scott Murray <scott.murray@konsulko.com> |
22 | |||
23 | --- | 22 | --- |
24 | src/basic/process-util.c | 2 +- | 23 | src/basic/process-util.c | 2 +- |
25 | 1 file changed, 1 insertion(+), 1 deletion(-) | 24 | 1 file changed, 1 insertion(+), 1 deletion(-) |
26 | 25 | ||
26 | diff --git a/src/basic/process-util.c b/src/basic/process-util.c | ||
27 | index 0747c14c1c..8d0c5aae92 100644 | ||
27 | --- a/src/basic/process-util.c | 28 | --- a/src/basic/process-util.c |
28 | +++ b/src/basic/process-util.c | 29 | +++ b/src/basic/process-util.c |
29 | @@ -1489,7 +1489,7 @@ int set_oom_score_adjust(int value) { | 30 | @@ -1516,7 +1516,7 @@ int set_oom_score_adjust(int value) { |
30 | xsprintf(t, "%i", value); | 31 | xsprintf(t, "%i", value); |
31 | 32 | ||
32 | return write_string_file("/proc/self/oom_score_adj", t, | 33 | return write_string_file("/proc/self/oom_score_adj", t, |
@@ -35,3 +36,6 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
35 | } | 36 | } |
36 | 37 | ||
37 | int get_oom_score_adjust(int *ret) { | 38 | int get_oom_score_adjust(int *ret) { |
39 | -- | ||
40 | 2.39.2 | ||
41 | |||
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0019-Handle-missing-LOCK_EX.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0019-Handle-missing-LOCK_EX.patch deleted file mode 100644 index d51ac4265..000000000 --- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0019-Handle-missing-LOCK_EX.patch +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | From 2284f2f44b1b30f10b9196e0f5c6d0a2e0c1871f Mon Sep 17 00:00:00 2001 | ||
2 | From: Alex Kiernan <alex.kiernan@gmail.com> | ||
3 | Date: Fri, 7 Aug 2020 15:19:27 +0000 | ||
4 | Subject: [PATCH] Handle missing LOCK_EX | ||
5 | |||
6 | Upstream-Status: Inappropriate [musl specific] | ||
7 | Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> | ||
8 | |||
9 | --- | ||
10 | src/partition/makefs.c | 1 + | ||
11 | 1 file changed, 1 insertion(+) | ||
12 | |||
13 | diff --git a/src/partition/makefs.c b/src/partition/makefs.c | ||
14 | index 7c94fbfedb..42f966722d 100644 | ||
15 | --- a/src/partition/makefs.c | ||
16 | +++ b/src/partition/makefs.c | ||
17 | @@ -6,6 +6,7 @@ | ||
18 | #include <sys/stat.h> | ||
19 | #include <sys/types.h> | ||
20 | #include <unistd.h> | ||
21 | +#include <sys/file.h> | ||
22 | |||
23 | #include "alloc-util.h" | ||
24 | #include "blockdev-util.h" | ||
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0019-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch index 878914b30..f6d908f94 100644 --- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch +++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0019-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 873202f63f9f117c6e5a98e444cc709057042979 Mon Sep 17 00:00:00 2001 | 1 | From ed46afcbc6bc1f6277a0a54c3db8cf1b056bca1e Mon Sep 17 00:00:00 2001 |
2 | From: Chen Qi <Qi.Chen@windriver.com> | 2 | From: Chen Qi <Qi.Chen@windriver.com> |
3 | Date: Tue, 10 Jul 2018 15:40:17 +0800 | 3 | Date: Tue, 10 Jul 2018 15:40:17 +0800 |
4 | Subject: [PATCH] distinguish XSI-compliant strerror_r from GNU-specifi | 4 | Subject: [PATCH] distinguish XSI-compliant strerror_r from GNU-specifi |
@@ -18,15 +18,16 @@ assigned to (char *) variable, resulting in segment fault. | |||
18 | Upstream-Status: Inappropriate [musl specific] | 18 | Upstream-Status: Inappropriate [musl specific] |
19 | 19 | ||
20 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | 20 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> |
21 | |||
22 | --- | 21 | --- |
23 | src/libsystemd/sd-bus/bus-error.c | 5 +++++ | 22 | src/libsystemd/sd-bus/bus-error.c | 11 ++++++++++- |
24 | src/libsystemd/sd-journal/journal-send.c | 5 +++++ | 23 | src/libsystemd/sd-journal/journal-send.c | 5 +++++ |
25 | 2 files changed, 10 insertions(+) | 24 | 2 files changed, 15 insertions(+), 1 deletion(-) |
26 | 25 | ||
26 | diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c | ||
27 | index 413e2dd43f..805e5da0c0 100644 | ||
27 | --- a/src/libsystemd/sd-bus/bus-error.c | 28 | --- a/src/libsystemd/sd-bus/bus-error.c |
28 | +++ b/src/libsystemd/sd-bus/bus-error.c | 29 | +++ b/src/libsystemd/sd-bus/bus-error.c |
29 | @@ -409,7 +409,12 @@ static void bus_error_strerror(sd_bus_er | 30 | @@ -408,7 +408,12 @@ static void bus_error_strerror(sd_bus_error *e, int error) { |
30 | return; | 31 | return; |
31 | 32 | ||
32 | errno = 0; | 33 | errno = 0; |
@@ -39,9 +40,25 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | |||
39 | if (errno == ERANGE || strlen(x) >= k - 1) { | 40 | if (errno == ERANGE || strlen(x) >= k - 1) { |
40 | free(m); | 41 | free(m); |
41 | k *= 2; | 42 | k *= 2; |
43 | @@ -593,8 +598,12 @@ const char* _bus_error_message(const sd_bus_error *e, int error, char buf[static | ||
44 | |||
45 | if (e && e->message) | ||
46 | return e->message; | ||
47 | - | ||
48 | +#ifndef __GLIBC__ | ||
49 | + strerror_r(abs(error), buf, ERRNO_BUF_LEN); | ||
50 | + return buf; | ||
51 | +#else | ||
52 | return strerror_r(abs(error), buf, ERRNO_BUF_LEN); | ||
53 | +#endif | ||
54 | } | ||
55 | |||
56 | static bool map_ok(const sd_bus_error_map *map) { | ||
57 | diff --git a/src/libsystemd/sd-journal/journal-send.c b/src/libsystemd/sd-journal/journal-send.c | ||
58 | index 136ebcb153..8a75ba4ecd 100644 | ||
42 | --- a/src/libsystemd/sd-journal/journal-send.c | 59 | --- a/src/libsystemd/sd-journal/journal-send.c |
43 | +++ b/src/libsystemd/sd-journal/journal-send.c | 60 | +++ b/src/libsystemd/sd-journal/journal-send.c |
44 | @@ -348,7 +348,12 @@ static int fill_iovec_perror_and_send(co | 61 | @@ -360,7 +360,12 @@ static int fill_iovec_perror_and_send(const char *message, int skip, struct iove |
45 | char* j; | 62 | char* j; |
46 | 63 | ||
47 | errno = 0; | 64 | errno = 0; |
@@ -54,3 +71,6 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | |||
54 | if (errno == 0) { | 71 | if (errno == 0) { |
55 | char error[STRLEN("ERRNO=") + DECIMAL_STR_MAX(int) + 1]; | 72 | char error[STRLEN("ERRNO=") + DECIMAL_STR_MAX(int) + 1]; |
56 | 73 | ||
74 | -- | ||
75 | 2.39.2 | ||
76 | |||
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch deleted file mode 100644 index 1ba5c1292..000000000 --- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | From a6a25e1ecae91f48a4f87bf0cc17eaaf0a919ffe Mon Sep 17 00:00:00 2001 | ||
2 | From: Alex Kiernan <alex.kiernan@gmail.com> | ||
3 | Date: Fri, 7 Aug 2020 15:20:17 +0000 | ||
4 | Subject: [PATCH] Fix incompatible pointer type struct sockaddr_un * | ||
5 | |||
6 | | ../../../../../../workspace/sources/systemd/src/nspawn/nspawn.c: In function 'cant_be_in_netns': | ||
7 | | ../../../../../../workspace/sources/systemd/src/nspawn/nspawn.c:4893:25: error: passing argument 2 of 'connect' from incompatible pointer type [-Werror=incompatible-pointer-types] | ||
8 | | 4893 | if (connect(fd, &sa.un, SOCKADDR_UN_LEN(sa.un)) < 0) { | ||
9 | | | ^~~~~~ | ||
10 | | | | | ||
11 | | | struct sockaddr_un * | ||
12 | | In file included from ../../../../../../workspace/sources/systemd/src/systemd/sd-daemon.h:22, | ||
13 | | from ../../../../../../workspace/sources/systemd/src/nspawn/nspawn.c:21: | ||
14 | | /home/ubuntu/poky/build/tmp/work/core2-64-poky-linux-musl/systemd/1_246-r0/recipe-sysroot/usr/include/sys/socket.h:384:19: note: expected 'const struct sockaddr *' but argument is of type 'struct sockaddr_un *' | ||
15 | | 384 | int connect (int, const struct sockaddr *, socklen_t); | ||
16 | | | ^~~~~~~~~~~~~~~~~~~~~~~ | ||
17 | | cc1: some warnings being treated as errors | ||
18 | |||
19 | Upstream-Status: Inappropriate [musl specific] | ||
20 | Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> | ||
21 | |||
22 | --- | ||
23 | src/nspawn/nspawn.c | 2 +- | ||
24 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
25 | |||
26 | --- a/src/nspawn/nspawn.c | ||
27 | +++ b/src/nspawn/nspawn.c | ||
28 | @@ -5389,7 +5389,7 @@ static int cant_be_in_netns(void) { | ||
29 | if (fd < 0) | ||
30 | return log_error_errno(errno, "Failed to allocate udev control socket: %m"); | ||
31 | |||
32 | - if (connect(fd, &sa.sa, SOCKADDR_UN_LEN(sa.un)) < 0) { | ||
33 | + if (connect(fd, (struct sockaddr *)&sa.sa, SOCKADDR_UN_LEN(sa.un)) < 0) { | ||
34 | |||
35 | if (errno == ENOENT || ERRNO_IS_DISCONNECT(errno)) | ||
36 | return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), | ||
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0018-avoid-redefinition-of-prctl_mm_map-structure.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0020-avoid-redefinition-of-prctl_mm_map-structure.patch index 5ca538628..e5f017347 100644 --- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0018-avoid-redefinition-of-prctl_mm_map-structure.patch +++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0020-avoid-redefinition-of-prctl_mm_map-structure.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From d95330f328c23c1cd6c51aeca43f081746cf2899 Mon Sep 17 00:00:00 2001 | 1 | From 277b680d07a178b8278862b60417052d05c1376f Mon Sep 17 00:00:00 2001 |
2 | From: Chen Qi <Qi.Chen@windriver.com> | 2 | From: Chen Qi <Qi.Chen@windriver.com> |
3 | Date: Mon, 25 Feb 2019 15:44:54 +0800 | 3 | Date: Mon, 25 Feb 2019 15:44:54 +0800 |
4 | Subject: [PATCH] avoid redefinition of prctl_mm_map structure | 4 | Subject: [PATCH] avoid redefinition of prctl_mm_map structure |
@@ -9,7 +9,6 @@ error: redefinition of 'struct prctl_mm_map' | |||
9 | Upstream-Status: Inappropriate [musl specific] | 9 | Upstream-Status: Inappropriate [musl specific] |
10 | 10 | ||
11 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | 11 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> |
12 | |||
13 | --- | 12 | --- |
14 | src/basic/missing_prctl.h | 2 ++ | 13 | src/basic/missing_prctl.h | 2 ++ |
15 | 1 file changed, 2 insertions(+) | 14 | 1 file changed, 2 insertions(+) |
@@ -28,3 +27,6 @@ index ab851306ba..5547cad875 100644 | |||
28 | 27 | ||
29 | /* 58319057b7847667f0c9585b9de0e8932b0fdb08 (4.3) */ | 28 | /* 58319057b7847667f0c9585b9de0e8932b0fdb08 (4.3) */ |
30 | #ifndef PR_CAP_AMBIENT | 29 | #ifndef PR_CAP_AMBIENT |
30 | -- | ||
31 | 2.39.2 | ||
32 | |||
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0022-do-not-disable-buffer-in-writing-files.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0021-do-not-disable-buffer-in-writing-files.patch index d389e1d9f..c85087219 100644 --- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0022-do-not-disable-buffer-in-writing-files.patch +++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0021-do-not-disable-buffer-in-writing-files.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 0f9422780a569c79a4b28e44c79c70b4a354bd92 Mon Sep 17 00:00:00 2001 | 1 | From aa6e5588e6d01c12e2f101d140cc710ab199df16 Mon Sep 17 00:00:00 2001 |
2 | From: Chen Qi <Qi.Chen@windriver.com> | 2 | From: Chen Qi <Qi.Chen@windriver.com> |
3 | Date: Fri, 1 Mar 2019 15:22:15 +0800 | 3 | Date: Fri, 1 Mar 2019 15:22:15 +0800 |
4 | Subject: [PATCH] do not disable buffer in writing files | 4 | Subject: [PATCH] do not disable buffer in writing files |
@@ -18,29 +18,33 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | |||
18 | Signed-off-by: Andrej Valek <andrej.valek@siemens.com> | 18 | Signed-off-by: Andrej Valek <andrej.valek@siemens.com> |
19 | [rebased for systemd 243] | 19 | [rebased for systemd 243] |
20 | Signed-off-by: Scott Murray <scott.murray@konsulko.com> | 20 | Signed-off-by: Scott Murray <scott.murray@konsulko.com> |
21 | 21 | [rebased for systemd 254] | |
22 | --- | 22 | --- |
23 | src/basic/cgroup-util.c | 10 +++++----- | 23 | src/basic/cgroup-util.c | 12 ++++++------ |
24 | src/basic/procfs-util.c | 4 ++-- | 24 | src/basic/namespace-util.c | 4 ++-- |
25 | src/basic/sysctl-util.c | 2 +- | 25 | src/basic/procfs-util.c | 4 ++-- |
26 | src/basic/util.c | 2 +- | 26 | src/basic/sysctl-util.c | 2 +- |
27 | src/binfmt/binfmt.c | 6 +++--- | 27 | src/binfmt/binfmt.c | 6 +++--- |
28 | src/core/main.c | 4 ++-- | 28 | src/core/cgroup.c | 2 +- |
29 | src/core/smack-setup.c | 8 ++++---- | 29 | src/core/main.c | 2 +- |
30 | src/hibernate-resume/hibernate-resume.c | 2 +- | 30 | src/core/smack-setup.c | 8 ++++---- |
31 | src/libsystemd/sd-device/sd-device.c | 2 +- | 31 | src/home/homework.c | 2 +- |
32 | src/nspawn/nspawn-cgroup.c | 2 +- | 32 | src/libsystemd/sd-device/sd-device.c | 2 +- |
33 | src/nspawn/nspawn.c | 6 +++--- | 33 | src/nspawn/nspawn-cgroup.c | 2 +- |
34 | src/shared/cgroup-setup.c | 4 ++-- | 34 | src/nspawn/nspawn.c | 6 +++--- |
35 | src/shared/mount-util.c | 4 ++-- | 35 | src/shared/binfmt-util.c | 2 +- |
36 | src/shared/smack-util.c | 2 +- | 36 | src/shared/cgroup-setup.c | 4 ++-- |
37 | src/sleep/sleep.c | 8 ++++---- | 37 | src/shared/coredump-util.c | 2 +- |
38 | src/vconsole/vconsole-setup.c | 2 +- | 38 | src/shared/sleep-util.c | 4 ++-- |
39 | 16 files changed, 34 insertions(+), 34 deletions(-) | 39 | src/shared/smack-util.c | 2 +- |
40 | src/sleep/sleep.c | 4 ++-- | ||
41 | src/udev/udev-rules.c | 1 - | ||
42 | src/vconsole/vconsole-setup.c | 2 +- | ||
43 | 20 files changed, 36 insertions(+), 37 deletions(-) | ||
40 | 44 | ||
41 | --- a/src/basic/cgroup-util.c | 45 | --- a/src/basic/cgroup-util.c |
42 | +++ b/src/basic/cgroup-util.c | 46 | +++ b/src/basic/cgroup-util.c |
43 | @@ -390,7 +390,7 @@ int cg_kill_kernel_sigkill(const char *c | 47 | @@ -400,7 +400,7 @@ int cg_kill_kernel_sigkill(const char *c |
44 | if (r < 0) | 48 | if (r < 0) |
45 | return r; | 49 | return r; |
46 | 50 | ||
@@ -49,7 +53,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
49 | if (r < 0) | 53 | if (r < 0) |
50 | return r; | 54 | return r; |
51 | 55 | ||
52 | @@ -803,7 +803,7 @@ int cg_install_release_agent(const char | 56 | @@ -806,7 +806,7 @@ int cg_install_release_agent(const char |
53 | 57 | ||
54 | sc = strstrip(contents); | 58 | sc = strstrip(contents); |
55 | if (isempty(sc)) { | 59 | if (isempty(sc)) { |
@@ -58,7 +62,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
58 | if (r < 0) | 62 | if (r < 0) |
59 | return r; | 63 | return r; |
60 | } else if (!path_equal(sc, agent)) | 64 | } else if (!path_equal(sc, agent)) |
61 | @@ -821,7 +821,7 @@ int cg_install_release_agent(const char | 65 | @@ -824,7 +824,7 @@ int cg_install_release_agent(const char |
62 | 66 | ||
63 | sc = strstrip(contents); | 67 | sc = strstrip(contents); |
64 | if (streq(sc, "0")) { | 68 | if (streq(sc, "0")) { |
@@ -67,7 +71,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
67 | if (r < 0) | 71 | if (r < 0) |
68 | return r; | 72 | return r; |
69 | 73 | ||
70 | @@ -848,7 +848,7 @@ int cg_uninstall_release_agent(const cha | 74 | @@ -851,7 +851,7 @@ int cg_uninstall_release_agent(const cha |
71 | if (r < 0) | 75 | if (r < 0) |
72 | return r; | 76 | return r; |
73 | 77 | ||
@@ -76,7 +80,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
76 | if (r < 0) | 80 | if (r < 0) |
77 | return r; | 81 | return r; |
78 | 82 | ||
79 | @@ -858,7 +858,7 @@ int cg_uninstall_release_agent(const cha | 83 | @@ -861,7 +861,7 @@ int cg_uninstall_release_agent(const cha |
80 | if (r < 0) | 84 | if (r < 0) |
81 | return r; | 85 | return r; |
82 | 86 | ||
@@ -85,7 +89,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
85 | if (r < 0) | 89 | if (r < 0) |
86 | return r; | 90 | return r; |
87 | 91 | ||
88 | @@ -1704,7 +1704,7 @@ int cg_set_attribute(const char *control | 92 | @@ -1764,7 +1764,7 @@ int cg_set_attribute(const char *control |
89 | if (r < 0) | 93 | if (r < 0) |
90 | return r; | 94 | return r; |
91 | 95 | ||
@@ -94,6 +98,23 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
94 | } | 98 | } |
95 | 99 | ||
96 | int cg_get_attribute(const char *controller, const char *path, const char *attribute, char **ret) { | 100 | int cg_get_attribute(const char *controller, const char *path, const char *attribute, char **ret) { |
101 | --- a/src/basic/namespace-util.c | ||
102 | +++ b/src/basic/namespace-util.c | ||
103 | @@ -227,12 +227,12 @@ int userns_acquire(const char *uid_map, | ||
104 | freeze(); | ||
105 | |||
106 | xsprintf(path, "/proc/" PID_FMT "/uid_map", pid); | ||
107 | - r = write_string_file(path, uid_map, WRITE_STRING_FILE_DISABLE_BUFFER); | ||
108 | + r = write_string_file(path, uid_map, 0); | ||
109 | if (r < 0) | ||
110 | return log_error_errno(r, "Failed to write UID map: %m"); | ||
111 | |||
112 | xsprintf(path, "/proc/" PID_FMT "/gid_map", pid); | ||
113 | - r = write_string_file(path, gid_map, WRITE_STRING_FILE_DISABLE_BUFFER); | ||
114 | + r = write_string_file(path, gid_map, 0); | ||
115 | if (r < 0) | ||
116 | return log_error_errno(r, "Failed to write GID map: %m"); | ||
117 | |||
97 | --- a/src/basic/procfs-util.c | 118 | --- a/src/basic/procfs-util.c |
98 | +++ b/src/basic/procfs-util.c | 119 | +++ b/src/basic/procfs-util.c |
99 | @@ -64,13 +64,13 @@ int procfs_tasks_set_limit(uint64_t limi | 120 | @@ -64,13 +64,13 @@ int procfs_tasks_set_limit(uint64_t limi |
@@ -123,20 +144,9 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
123 | } | 144 | } |
124 | 145 | ||
125 | int sysctl_writef(const char *property, const char *format, ...) { | 146 | int sysctl_writef(const char *property, const char *format, ...) { |
126 | --- a/src/basic/util.c | ||
127 | +++ b/src/basic/util.c | ||
128 | @@ -168,7 +168,7 @@ void disable_coredumps(void) { | ||
129 | if (detect_container() > 0) | ||
130 | return; | ||
131 | |||
132 | - r = write_string_file("/proc/sys/kernel/core_pattern", "|/bin/false", WRITE_STRING_FILE_DISABLE_BUFFER); | ||
133 | + r = write_string_file("/proc/sys/kernel/core_pattern", "|/bin/false", 0); | ||
134 | if (r < 0) | ||
135 | log_debug_errno(r, "Failed to turn off coredumps, ignoring: %m"); | ||
136 | } | ||
137 | --- a/src/binfmt/binfmt.c | 147 | --- a/src/binfmt/binfmt.c |
138 | +++ b/src/binfmt/binfmt.c | 148 | +++ b/src/binfmt/binfmt.c |
139 | @@ -29,7 +29,7 @@ static bool arg_unregister = false; | 149 | @@ -30,7 +30,7 @@ static bool arg_unregister = false; |
140 | 150 | ||
141 | static int delete_rule(const char *rulename) { | 151 | static int delete_rule(const char *rulename) { |
142 | const char *fn = strjoina("/proc/sys/fs/binfmt_misc/", rulename); | 152 | const char *fn = strjoina("/proc/sys/fs/binfmt_misc/", rulename); |
@@ -145,7 +155,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
145 | } | 155 | } |
146 | 156 | ||
147 | static int apply_rule(const char *filename, unsigned line, const char *rule) { | 157 | static int apply_rule(const char *filename, unsigned line, const char *rule) { |
148 | @@ -59,7 +59,7 @@ static int apply_rule(const char *filena | 158 | @@ -58,7 +58,7 @@ static int apply_rule(const char *filena |
149 | if (r >= 0) | 159 | if (r >= 0) |
150 | log_debug("%s:%u: Rule '%s' deleted.", filename, line, rulename); | 160 | log_debug("%s:%u: Rule '%s' deleted.", filename, line, rulename); |
151 | 161 | ||
@@ -154,8 +164,8 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
154 | if (r < 0) | 164 | if (r < 0) |
155 | return log_error_errno(r, "%s:%u: Failed to add binary format '%s': %m", | 165 | return log_error_errno(r, "%s:%u: Failed to add binary format '%s': %m", |
156 | filename, line, rulename); | 166 | filename, line, rulename); |
157 | @@ -226,7 +226,7 @@ static int run(int argc, char *argv[]) { | 167 | @@ -244,7 +244,7 @@ static int run(int argc, char *argv[]) { |
158 | } | 168 | return r; |
159 | 169 | ||
160 | /* Flush out all rules */ | 170 | /* Flush out all rules */ |
161 | - r = write_string_file("/proc/sys/fs/binfmt_misc/status", "-1", WRITE_STRING_FILE_DISABLE_BUFFER); | 171 | - r = write_string_file("/proc/sys/fs/binfmt_misc/status", "-1", WRITE_STRING_FILE_DISABLE_BUFFER); |
@@ -163,17 +173,19 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
163 | if (r < 0) | 173 | if (r < 0) |
164 | log_warning_errno(r, "Failed to flush binfmt_misc rules, ignoring: %m"); | 174 | log_warning_errno(r, "Failed to flush binfmt_misc rules, ignoring: %m"); |
165 | else | 175 | else |
166 | --- a/src/core/main.c | 176 | --- a/src/core/cgroup.c |
167 | +++ b/src/core/main.c | 177 | +++ b/src/core/cgroup.c |
168 | @@ -1466,7 +1466,7 @@ static int bump_unix_max_dgram_qlen(void | 178 | @@ -4349,7 +4349,7 @@ int unit_cgroup_freezer_action(Unit *u, |
169 | if (v >= DEFAULT_UNIX_MAX_DGRAM_QLEN) | 179 | u->freezer_state = FREEZER_THAWING; |
170 | return 0; | 180 | } |
171 | 181 | ||
172 | - r = write_string_filef("/proc/sys/net/unix/max_dgram_qlen", WRITE_STRING_FILE_DISABLE_BUFFER, | 182 | - r = write_string_file(path, one_zero(action == FREEZER_FREEZE), WRITE_STRING_FILE_DISABLE_BUFFER); |
173 | + r = write_string_filef("/proc/sys/net/unix/max_dgram_qlen", 0, | 183 | + r = write_string_file(path, one_zero(action == FREEZER_FREEZE), 0); |
174 | "%lu", DEFAULT_UNIX_MAX_DGRAM_QLEN); | ||
175 | if (r < 0) | 184 | if (r < 0) |
176 | return log_full_errno(IN_SET(r, -EROFS, -EPERM, -EACCES) ? LOG_DEBUG : LOG_WARNING, r, | 185 | return r; |
186 | |||
187 | --- a/src/core/main.c | ||
188 | +++ b/src/core/main.c | ||
177 | @@ -1737,7 +1737,7 @@ static void initialize_core_pattern(bool | 189 | @@ -1737,7 +1737,7 @@ static void initialize_core_pattern(bool |
178 | if (getpid_cached() != 1) | 190 | if (getpid_cached() != 1) |
179 | return; | 191 | return; |
@@ -185,7 +197,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
185 | arg_early_core_pattern); | 197 | arg_early_core_pattern); |
186 | --- a/src/core/smack-setup.c | 198 | --- a/src/core/smack-setup.c |
187 | +++ b/src/core/smack-setup.c | 199 | +++ b/src/core/smack-setup.c |
188 | @@ -320,17 +320,17 @@ int mac_smack_setup(bool *loaded_policy) | 200 | @@ -319,17 +319,17 @@ int mac_smack_setup(bool *loaded_policy) |
189 | } | 201 | } |
190 | 202 | ||
191 | #if HAVE_SMACK_RUN_LABEL | 203 | #if HAVE_SMACK_RUN_LABEL |
@@ -207,20 +219,20 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
207 | if (r < 0) | 219 | if (r < 0) |
208 | log_warning_errno(r, "Failed to set SMACK netlabel rule \"127.0.0.1 -CIPSO\": %m"); | 220 | log_warning_errno(r, "Failed to set SMACK netlabel rule \"127.0.0.1 -CIPSO\": %m"); |
209 | #endif | 221 | #endif |
210 | --- a/src/hibernate-resume/hibernate-resume.c | 222 | --- a/src/home/homework.c |
211 | +++ b/src/hibernate-resume/hibernate-resume.c | 223 | +++ b/src/home/homework.c |
212 | @@ -45,7 +45,7 @@ int main(int argc, char *argv[]) { | 224 | @@ -278,7 +278,7 @@ static void drop_caches_now(void) { |
213 | return EXIT_FAILURE; | 225 | * for details. We write "2" into /proc/sys/vm/drop_caches to ensure dentries/inodes are flushed, but |
214 | } | 226 | * not more. */ |
215 | 227 | ||
216 | - r = write_string_file("/sys/power/resume", major_minor, WRITE_STRING_FILE_DISABLE_BUFFER); | 228 | - r = write_string_file("/proc/sys/vm/drop_caches", "2\n", WRITE_STRING_FILE_DISABLE_BUFFER); |
217 | + r = write_string_file("/sys/power/resume", major_minor, 0); | 229 | + r = write_string_file("/proc/sys/vm/drop_caches", "2\n", 0); |
218 | if (r < 0) { | 230 | if (r < 0) |
219 | log_error_errno(r, "Failed to write '%s' to /sys/power/resume: %m", major_minor); | 231 | log_warning_errno(r, "Failed to drop caches, ignoring: %m"); |
220 | return EXIT_FAILURE; | 232 | else |
221 | --- a/src/libsystemd/sd-device/sd-device.c | 233 | --- a/src/libsystemd/sd-device/sd-device.c |
222 | +++ b/src/libsystemd/sd-device/sd-device.c | 234 | +++ b/src/libsystemd/sd-device/sd-device.c |
223 | @@ -2108,7 +2108,7 @@ _public_ int sd_device_set_sysattr_value | 235 | @@ -2515,7 +2515,7 @@ _public_ int sd_device_set_sysattr_value |
224 | if (!value) | 236 | if (!value) |
225 | return -ENOMEM; | 237 | return -ENOMEM; |
226 | 238 | ||
@@ -231,7 +243,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
231 | device_remove_cached_sysattr_value(device, sysattr); | 243 | device_remove_cached_sysattr_value(device, sysattr); |
232 | --- a/src/nspawn/nspawn-cgroup.c | 244 | --- a/src/nspawn/nspawn-cgroup.c |
233 | +++ b/src/nspawn/nspawn-cgroup.c | 245 | +++ b/src/nspawn/nspawn-cgroup.c |
234 | @@ -124,7 +124,7 @@ int sync_cgroup(pid_t pid, CGroupUnified | 246 | @@ -122,7 +122,7 @@ int sync_cgroup(pid_t pid, CGroupUnified |
235 | fn = strjoina(tree, cgroup, "/cgroup.procs"); | 247 | fn = strjoina(tree, cgroup, "/cgroup.procs"); |
236 | 248 | ||
237 | sprintf(pid_string, PID_FMT, pid); | 249 | sprintf(pid_string, PID_FMT, pid); |
@@ -242,7 +254,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
242 | goto finish; | 254 | goto finish; |
243 | --- a/src/nspawn/nspawn.c | 255 | --- a/src/nspawn/nspawn.c |
244 | +++ b/src/nspawn/nspawn.c | 256 | +++ b/src/nspawn/nspawn.c |
245 | @@ -2757,7 +2757,7 @@ static int reset_audit_loginuid(void) { | 257 | @@ -2774,7 +2774,7 @@ static int reset_audit_loginuid(void) { |
246 | if (streq(p, "4294967295")) | 258 | if (streq(p, "4294967295")) |
247 | return 0; | 259 | return 0; |
248 | 260 | ||
@@ -251,7 +263,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
251 | if (r < 0) { | 263 | if (r < 0) { |
252 | log_error_errno(r, | 264 | log_error_errno(r, |
253 | "Failed to reset audit login UID. This probably means that your kernel is too\n" | 265 | "Failed to reset audit login UID. This probably means that your kernel is too\n" |
254 | @@ -4163,7 +4163,7 @@ static int setup_uid_map( | 266 | @@ -4214,7 +4214,7 @@ static int setup_uid_map( |
255 | return log_oom(); | 267 | return log_oom(); |
256 | 268 | ||
257 | xsprintf(uid_map, "/proc/" PID_FMT "/uid_map", pid); | 269 | xsprintf(uid_map, "/proc/" PID_FMT "/uid_map", pid); |
@@ -260,7 +272,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
260 | if (r < 0) | 272 | if (r < 0) |
261 | return log_error_errno(r, "Failed to write UID map: %m"); | 273 | return log_error_errno(r, "Failed to write UID map: %m"); |
262 | 274 | ||
263 | @@ -4173,7 +4173,7 @@ static int setup_uid_map( | 275 | @@ -4224,7 +4224,7 @@ static int setup_uid_map( |
264 | return log_oom(); | 276 | return log_oom(); |
265 | 277 | ||
266 | xsprintf(uid_map, "/proc/" PID_FMT "/gid_map", pid); | 278 | xsprintf(uid_map, "/proc/" PID_FMT "/gid_map", pid); |
@@ -269,18 +281,29 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
269 | if (r < 0) | 281 | if (r < 0) |
270 | return log_error_errno(r, "Failed to write GID map: %m"); | 282 | return log_error_errno(r, "Failed to write GID map: %m"); |
271 | 283 | ||
284 | --- a/src/shared/binfmt-util.c | ||
285 | +++ b/src/shared/binfmt-util.c | ||
286 | @@ -46,7 +46,7 @@ int disable_binfmt(void) { | ||
287 | return 0; | ||
288 | } | ||
289 | |||
290 | - r = write_string_file("/proc/sys/fs/binfmt_misc/status", "-1", WRITE_STRING_FILE_DISABLE_BUFFER); | ||
291 | + r = write_string_file("/proc/sys/fs/binfmt_misc/status", "-1", 0); | ||
292 | if (r < 0) | ||
293 | return log_warning_errno(r, "Failed to unregister binfmt_misc entries: %m"); | ||
294 | |||
272 | --- a/src/shared/cgroup-setup.c | 295 | --- a/src/shared/cgroup-setup.c |
273 | +++ b/src/shared/cgroup-setup.c | 296 | +++ b/src/shared/cgroup-setup.c |
274 | @@ -345,7 +345,7 @@ int cg_attach(const char *controller, co | 297 | @@ -351,7 +351,7 @@ int cg_attach(const char *controller, co |
275 | 298 | ||
276 | xsprintf(c, PID_FMT "\n", pid); | 299 | xsprintf(c, PID_FMT "\n", pid); |
277 | 300 | ||
278 | - r = write_string_file(fs, c, WRITE_STRING_FILE_DISABLE_BUFFER); | 301 | - r = write_string_file(fs, c, WRITE_STRING_FILE_DISABLE_BUFFER); |
279 | + r = write_string_file(fs, c, 0); | 302 | + r = write_string_file(fs, c, 0); |
280 | if (r < 0) | 303 | if (r == -EOPNOTSUPP && cg_is_threaded(controller, path) > 0) |
281 | return r; | 304 | /* When the threaded mode is used, we cannot read/write the file. Let's return recognizable error. */ |
282 | 305 | return -EUCLEAN; | |
283 | @@ -877,7 +877,7 @@ int cg_enable_everywhere( | 306 | @@ -964,7 +964,7 @@ int cg_enable_everywhere( |
284 | return log_debug_errno(errno, "Failed to open cgroup.subtree_control file of %s: %m", p); | 307 | return log_debug_errno(errno, "Failed to open cgroup.subtree_control file of %s: %m", p); |
285 | } | 308 | } |
286 | 309 | ||
@@ -289,9 +312,40 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
289 | if (r < 0) { | 312 | if (r < 0) { |
290 | log_debug_errno(r, "Failed to %s controller %s for %s (%s): %m", | 313 | log_debug_errno(r, "Failed to %s controller %s for %s (%s): %m", |
291 | FLAGS_SET(mask, bit) ? "enable" : "disable", n, p, fs); | 314 | FLAGS_SET(mask, bit) ? "enable" : "disable", n, p, fs); |
315 | --- a/src/shared/coredump-util.c | ||
316 | +++ b/src/shared/coredump-util.c | ||
317 | @@ -163,7 +163,7 @@ int set_coredump_filter(uint64_t value) | ||
318 | xsprintf(t, "0x%"PRIx64, value); | ||
319 | |||
320 | return write_string_file("/proc/self/coredump_filter", t, | ||
321 | - WRITE_STRING_FILE_VERIFY_ON_FAILURE|WRITE_STRING_FILE_DISABLE_BUFFER); | ||
322 | + 0); | ||
323 | } | ||
324 | |||
325 | /* Turn off core dumps but only if we're running outside of a container. */ | ||
326 | --- a/src/shared/sleep-util.c | ||
327 | +++ b/src/shared/sleep-util.c | ||
328 | @@ -1044,7 +1044,7 @@ int write_resume_config(dev_t devno, uin | ||
329 | |||
330 | /* We write the offset first since it's safer. Note that this file is only available in 4.17+, so | ||
331 | * fail gracefully if it doesn't exist and we're only overwriting it with 0. */ | ||
332 | - r = write_string_file("/sys/power/resume_offset", offset_str, WRITE_STRING_FILE_DISABLE_BUFFER); | ||
333 | + r = write_string_file("/sys/power/resume_offset", offset_str, 0); | ||
334 | if (r == -ENOENT) { | ||
335 | if (offset != 0) | ||
336 | return log_error_errno(SYNTHETIC_ERRNO(EOPNOTSUPP), | ||
337 | @@ -1060,7 +1060,7 @@ int write_resume_config(dev_t devno, uin | ||
338 | log_debug("Wrote resume_offset=%s for device '%s' to /sys/power/resume_offset.", | ||
339 | offset_str, device); | ||
340 | |||
341 | - r = write_string_file("/sys/power/resume", devno_str, WRITE_STRING_FILE_DISABLE_BUFFER); | ||
342 | + r = write_string_file("/sys/power/resume", devno_str, 0); | ||
343 | if (r < 0) | ||
344 | return log_error_errno(r, | ||
345 | "Failed to write device '%s' (%s) to /sys/power/resume: %m", | ||
292 | --- a/src/shared/smack-util.c | 346 | --- a/src/shared/smack-util.c |
293 | +++ b/src/shared/smack-util.c | 347 | +++ b/src/shared/smack-util.c |
294 | @@ -114,7 +114,7 @@ int mac_smack_apply_pid(pid_t pid, const | 348 | @@ -113,7 +113,7 @@ int mac_smack_apply_pid(pid_t pid, const |
295 | return 0; | 349 | return 0; |
296 | 350 | ||
297 | p = procfs_file_alloca(pid, "attr/current"); | 351 | p = procfs_file_alloca(pid, "attr/current"); |
@@ -302,25 +356,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
302 | 356 | ||
303 | --- a/src/sleep/sleep.c | 357 | --- a/src/sleep/sleep.c |
304 | +++ b/src/sleep/sleep.c | 358 | +++ b/src/sleep/sleep.c |
305 | @@ -46,7 +46,7 @@ static int write_hibernate_location_info | 359 | @@ -139,7 +139,7 @@ static int write_mode(char **modes) { |
306 | assert(hibernate_location->swap); | ||
307 | |||
308 | xsprintf(resume_str, "%u:%u", major(hibernate_location->devno), minor(hibernate_location->devno)); | ||
309 | - r = write_string_file("/sys/power/resume", resume_str, WRITE_STRING_FILE_DISABLE_BUFFER); | ||
310 | + r = write_string_file("/sys/power/resume", resume_str, 0); | ||
311 | if (r < 0) | ||
312 | return log_debug_errno(r, "Failed to write partition device to /sys/power/resume for '%s': '%s': %m", | ||
313 | hibernate_location->swap->device, resume_str); | ||
314 | @@ -73,7 +73,7 @@ static int write_hibernate_location_info | ||
315 | } | ||
316 | |||
317 | xsprintf(offset_str, "%" PRIu64, hibernate_location->offset); | ||
318 | - r = write_string_file("/sys/power/resume_offset", offset_str, WRITE_STRING_FILE_DISABLE_BUFFER); | ||
319 | + r = write_string_file("/sys/power/resume_offset", offset_str, 0); | ||
320 | if (r < 0) | ||
321 | return log_debug_errno(r, "Failed to write swap file offset to /sys/power/resume_offset for '%s': '%s': %m", | ||
322 | hibernate_location->swap->device, offset_str); | ||
323 | @@ -90,7 +90,7 @@ static int write_mode(char **modes) { | ||
324 | STRV_FOREACH(mode, modes) { | 360 | STRV_FOREACH(mode, modes) { |
325 | int k; | 361 | int k; |
326 | 362 | ||
@@ -329,7 +365,7 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
329 | if (k >= 0) | 365 | if (k >= 0) |
330 | return 0; | 366 | return 0; |
331 | 367 | ||
332 | @@ -112,7 +112,7 @@ static int write_state(FILE **f, char ** | 368 | @@ -160,7 +160,7 @@ static int write_state(FILE **f, char ** |
333 | STRV_FOREACH(state, states) { | 369 | STRV_FOREACH(state, states) { |
334 | int k; | 370 | int k; |
335 | 371 | ||
@@ -338,9 +374,19 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
338 | if (k >= 0) | 374 | if (k >= 0) |
339 | return 0; | 375 | return 0; |
340 | log_debug_errno(k, "Failed to write '%s' to /sys/power/state: %m", *state); | 376 | log_debug_errno(k, "Failed to write '%s' to /sys/power/state: %m", *state); |
377 | --- a/src/udev/udev-rules.c | ||
378 | +++ b/src/udev/udev-rules.c | ||
379 | @@ -2634,7 +2634,6 @@ static int udev_rule_apply_token_to_even | ||
380 | log_event_debug(dev, token, "ATTR '%s' writing '%s'", buf, value); | ||
381 | r = write_string_file(buf, value, | ||
382 | WRITE_STRING_FILE_VERIFY_ON_FAILURE | | ||
383 | - WRITE_STRING_FILE_DISABLE_BUFFER | | ||
384 | WRITE_STRING_FILE_AVOID_NEWLINE | | ||
385 | WRITE_STRING_FILE_VERIFY_IGNORE_NEWLINE); | ||
386 | if (r < 0) | ||
341 | --- a/src/vconsole/vconsole-setup.c | 387 | --- a/src/vconsole/vconsole-setup.c |
342 | +++ b/src/vconsole/vconsole-setup.c | 388 | +++ b/src/vconsole/vconsole-setup.c |
343 | @@ -108,7 +108,7 @@ static int toggle_utf8_vc(const char *na | 389 | @@ -260,7 +260,7 @@ static int toggle_utf8_vc(const char *na |
344 | static int toggle_utf8_sysfs(bool utf8) { | 390 | static int toggle_utf8_sysfs(bool utf8) { |
345 | int r; | 391 | int r; |
346 | 392 | ||
@@ -349,72 +395,3 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
349 | if (r < 0) | 395 | if (r < 0) |
350 | return log_warning_errno(r, "Failed to %s sysfs UTF-8 flag: %m", enable_disable(utf8)); | 396 | return log_warning_errno(r, "Failed to %s sysfs UTF-8 flag: %m", enable_disable(utf8)); |
351 | 397 | ||
352 | --- a/src/basic/namespace-util.c | ||
353 | +++ b/src/basic/namespace-util.c | ||
354 | @@ -202,12 +202,12 @@ int userns_acquire(const char *uid_map, | ||
355 | freeze(); | ||
356 | |||
357 | xsprintf(path, "/proc/" PID_FMT "/uid_map", pid); | ||
358 | - r = write_string_file(path, uid_map, WRITE_STRING_FILE_DISABLE_BUFFER); | ||
359 | + r = write_string_file(path, uid_map, 0); | ||
360 | if (r < 0) | ||
361 | return log_error_errno(r, "Failed to write UID map: %m"); | ||
362 | |||
363 | xsprintf(path, "/proc/" PID_FMT "/gid_map", pid); | ||
364 | - r = write_string_file(path, gid_map, WRITE_STRING_FILE_DISABLE_BUFFER); | ||
365 | + r = write_string_file(path, gid_map, 0); | ||
366 | if (r < 0) | ||
367 | return log_error_errno(r, "Failed to write GID map: %m"); | ||
368 | |||
369 | --- a/src/core/cgroup.c | ||
370 | +++ b/src/core/cgroup.c | ||
371 | @@ -4140,7 +4140,7 @@ int unit_cgroup_freezer_action(Unit *u, | ||
372 | else | ||
373 | u->freezer_state = FREEZER_THAWING; | ||
374 | |||
375 | - r = write_string_file(path, one_zero(action == FREEZER_FREEZE), WRITE_STRING_FILE_DISABLE_BUFFER); | ||
376 | + r = write_string_file(path, one_zero(action == FREEZER_FREEZE), 0); | ||
377 | if (r < 0) | ||
378 | return r; | ||
379 | |||
380 | --- a/src/home/homework.c | ||
381 | +++ b/src/home/homework.c | ||
382 | @@ -284,7 +284,7 @@ static void drop_caches_now(void) { | ||
383 | * details. We write "2" into /proc/sys/vm/drop_caches to ensure dentries/inodes are flushed, but not | ||
384 | * more. */ | ||
385 | |||
386 | - r = write_string_file("/proc/sys/vm/drop_caches", "2\n", WRITE_STRING_FILE_DISABLE_BUFFER); | ||
387 | + r = write_string_file("/proc/sys/vm/drop_caches", "2\n", 0); | ||
388 | if (r < 0) | ||
389 | log_warning_errno(r, "Failed to drop caches, ignoring: %m"); | ||
390 | else | ||
391 | --- a/src/shared/binfmt-util.c | ||
392 | +++ b/src/shared/binfmt-util.c | ||
393 | @@ -26,7 +26,7 @@ int disable_binfmt(void) { | ||
394 | if (r < 0) | ||
395 | return log_warning_errno(r, "Failed to determine whether binfmt_misc is mounted: %m"); | ||
396 | |||
397 | - r = write_string_file("/proc/sys/fs/binfmt_misc/status", "-1", WRITE_STRING_FILE_DISABLE_BUFFER); | ||
398 | + r = write_string_file("/proc/sys/fs/binfmt_misc/status", "-1", 0); | ||
399 | if (r < 0) | ||
400 | return log_warning_errno(r, "Failed to unregister binfmt_misc entries: %m"); | ||
401 | |||
402 | --- a/src/shared/coredump-util.c | ||
403 | +++ b/src/shared/coredump-util.c | ||
404 | @@ -70,5 +70,5 @@ int set_coredump_filter(uint64_t value) | ||
405 | sprintf(t, "0x%"PRIx64, value); | ||
406 | |||
407 | return write_string_file("/proc/self/coredump_filter", t, | ||
408 | - WRITE_STRING_FILE_VERIFY_ON_FAILURE|WRITE_STRING_FILE_DISABLE_BUFFER); | ||
409 | + WRITE_STRING_FILE_VERIFY_ON_FAILURE); | ||
410 | } | ||
411 | --- a/src/udev/udev-rules.c | ||
412 | +++ b/src/udev/udev-rules.c | ||
413 | @@ -2181,7 +2181,6 @@ static int udev_rule_apply_token_to_even | ||
414 | log_rule_debug(dev, rules, "ATTR '%s' writing '%s'", buf, value); | ||
415 | r = write_string_file(buf, value, | ||
416 | WRITE_STRING_FILE_VERIFY_ON_FAILURE | | ||
417 | - WRITE_STRING_FILE_DISABLE_BUFFER | | ||
418 | WRITE_STRING_FILE_AVOID_NEWLINE | | ||
419 | WRITE_STRING_FILE_VERIFY_IGNORE_NEWLINE); | ||
420 | if (r < 0) | ||
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0021-test-json.c-define-M_PIl.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0021-test-json.c-define-M_PIl.patch deleted file mode 100644 index dfab8fbbd..000000000 --- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0021-test-json.c-define-M_PIl.patch +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | From 47472da6e8900773c26da8fd26699367447d97a6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Chen Qi <Qi.Chen@windriver.com> | ||
3 | Date: Mon, 25 Feb 2019 16:53:06 +0800 | ||
4 | Subject: [PATCH] test-json.c: define M_PIl | ||
5 | |||
6 | Fix the following compile failure: | ||
7 | src/test/test-json.c:305:50: error: 'M_PIl' undeclared (first use in this function); did you mean 'M_PI'? | ||
8 | |||
9 | Upstream-Status: Inappropriate [musl specific] | ||
10 | |||
11 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
12 | |||
13 | --- | ||
14 | src/test/test-json.c | 4 ++++ | ||
15 | 1 file changed, 4 insertions(+) | ||
16 | |||
17 | --- a/src/test/test-json.c | ||
18 | +++ b/src/test/test-json.c | ||
19 | @@ -14,6 +14,10 @@ | ||
20 | #include "tests.h" | ||
21 | #include "util.h" | ||
22 | |||
23 | +#ifndef M_PIl | ||
24 | +#define M_PIl 3.141592653589793238462643383279502884L | ||
25 | +#endif | ||
26 | + | ||
27 | static void test_tokenizer_one(const char *data, ...) { | ||
28 | unsigned line = 0, column = 0; | ||
29 | void *state = NULL; | ||
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0025-Handle-__cpu_mask-usage.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0022-Handle-__cpu_mask-usage.patch index e001ed59e..580aff327 100644 --- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0025-Handle-__cpu_mask-usage.patch +++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0022-Handle-__cpu_mask-usage.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From e4f9ef547fa342102db15188544daa18e71e9c66 Mon Sep 17 00:00:00 2001 | 1 | From a50ec65dbe660421052656dda7499c925005f486 Mon Sep 17 00:00:00 2001 |
2 | From: Scott Murray <scott.murray@konsulko.com> | 2 | From: Scott Murray <scott.murray@konsulko.com> |
3 | Date: Fri, 13 Sep 2019 19:26:27 -0400 | 3 | Date: Fri, 13 Sep 2019 19:26:27 -0400 |
4 | Subject: [PATCH] Handle __cpu_mask usage | 4 | Subject: [PATCH] Handle __cpu_mask usage |
@@ -18,14 +18,11 @@ add a typedef to cpu-set-util.h defining __cpu_mask appropriately. | |||
18 | Upstream-Status: Inappropriate [musl specific] | 18 | Upstream-Status: Inappropriate [musl specific] |
19 | 19 | ||
20 | Signed-off-by: Scott Murray <scott.murray@konsulko.com> | 20 | Signed-off-by: Scott Murray <scott.murray@konsulko.com> |
21 | |||
22 | --- | 21 | --- |
23 | src/shared/cpu-set-util.h | 2 ++ | 22 | src/shared/cpu-set-util.h | 2 ++ |
24 | src/test/test-sizeof.c | 2 +- | 23 | src/test/test-sizeof.c | 2 +- |
25 | 2 files changed, 3 insertions(+), 1 deletion(-) | 24 | 2 files changed, 3 insertions(+), 1 deletion(-) |
26 | 25 | ||
27 | diff --git a/src/shared/cpu-set-util.h b/src/shared/cpu-set-util.h | ||
28 | index 3c63a58826..4c2d4347fc 100644 | ||
29 | --- a/src/shared/cpu-set-util.h | 26 | --- a/src/shared/cpu-set-util.h |
30 | +++ b/src/shared/cpu-set-util.h | 27 | +++ b/src/shared/cpu-set-util.h |
31 | @@ -6,6 +6,8 @@ | 28 | @@ -6,6 +6,8 @@ |
@@ -37,8 +34,6 @@ index 3c63a58826..4c2d4347fc 100644 | |||
37 | /* This wraps the libc interface with a variable to keep the allocated size. */ | 34 | /* This wraps the libc interface with a variable to keep the allocated size. */ |
38 | typedef struct CPUSet { | 35 | typedef struct CPUSet { |
39 | cpu_set_t *set; | 36 | cpu_set_t *set; |
40 | diff --git a/src/test/test-sizeof.c b/src/test/test-sizeof.c | ||
41 | index 4403c0aa52..e7e4ae112d 100644 | ||
42 | --- a/src/test/test-sizeof.c | 37 | --- a/src/test/test-sizeof.c |
43 | +++ b/src/test/test-sizeof.c | 38 | +++ b/src/test/test-sizeof.c |
44 | @@ -1,6 +1,5 @@ | 39 | @@ -1,6 +1,5 @@ |
@@ -47,8 +42,8 @@ index 4403c0aa52..e7e4ae112d 100644 | |||
47 | -#include <sched.h> | 42 | -#include <sched.h> |
48 | #include <stdio.h> | 43 | #include <stdio.h> |
49 | #include <string.h> | 44 | #include <string.h> |
50 | #include <sys/types.h> | 45 | #include <sys/resource.h> |
51 | @@ -10,6 +9,7 @@ | 46 | @@ -12,6 +11,7 @@ |
52 | #include <float.h> | 47 | #include <float.h> |
53 | 48 | ||
54 | #include "time-util.h" | 49 | #include "time-util.h" |
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0026-Handle-missing-gshadow.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0023-Handle-missing-gshadow.patch index 2d06ab84a..19ee3ff31 100644 --- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0026-Handle-missing-gshadow.patch +++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0023-Handle-missing-gshadow.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 66a926cf906260c2fb5ea851e55efe03edd444dc Mon Sep 17 00:00:00 2001 | 1 | From ebf0f69d8614b8d86a971b97ff0d847d1e5d47c9 Mon Sep 17 00:00:00 2001 |
2 | From: Alex Kiernan <alex.kiernan@gmail.com> | 2 | From: Alex Kiernan <alex.kiernan@gmail.com> |
3 | Date: Tue, 10 Mar 2020 11:05:20 +0000 | 3 | Date: Tue, 10 Mar 2020 11:05:20 +0000 |
4 | Subject: [PATCH] Handle missing gshadow | 4 | Subject: [PATCH] Handle missing gshadow |
@@ -10,16 +10,17 @@ Upstream-Status: Inappropriate [musl specific] | |||
10 | Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> | 10 | Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> |
11 | [Rebased for v247] | 11 | [Rebased for v247] |
12 | Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | 12 | Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> |
13 | |||
14 | --- | 13 | --- |
15 | src/shared/user-record-nss.c | 20 ++++++++++++++++++++ | 14 | src/shared/user-record-nss.c | 20 ++++++++++++++++++++ |
16 | src/shared/user-record-nss.h | 4 ++++ | 15 | src/shared/user-record-nss.h | 4 ++++ |
17 | src/shared/userdb.c | 7 ++++++- | 16 | src/shared/userdb.c | 7 ++++++- |
18 | 3 files changed, 30 insertions(+), 1 deletion(-) | 17 | 3 files changed, 30 insertions(+), 1 deletion(-) |
19 | 18 | ||
19 | diff --git a/src/shared/user-record-nss.c b/src/shared/user-record-nss.c | ||
20 | index 88b8fc2f8f..a819d41bac 100644 | ||
20 | --- a/src/shared/user-record-nss.c | 21 | --- a/src/shared/user-record-nss.c |
21 | +++ b/src/shared/user-record-nss.c | 22 | +++ b/src/shared/user-record-nss.c |
22 | @@ -331,8 +331,10 @@ int nss_group_to_group_record( | 23 | @@ -329,8 +329,10 @@ int nss_group_to_group_record( |
23 | if (isempty(grp->gr_name)) | 24 | if (isempty(grp->gr_name)) |
24 | return -EINVAL; | 25 | return -EINVAL; |
25 | 26 | ||
@@ -30,7 +31,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
30 | 31 | ||
31 | g = group_record_new(); | 32 | g = group_record_new(); |
32 | if (!g) | 33 | if (!g) |
33 | @@ -348,6 +350,7 @@ int nss_group_to_group_record( | 34 | @@ -346,6 +348,7 @@ int nss_group_to_group_record( |
34 | 35 | ||
35 | g->gid = grp->gr_gid; | 36 | g->gid = grp->gr_gid; |
36 | 37 | ||
@@ -38,7 +39,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
38 | if (sgrp) { | 39 | if (sgrp) { |
39 | if (looks_like_hashed_password(utf8_only(sgrp->sg_passwd))) { | 40 | if (looks_like_hashed_password(utf8_only(sgrp->sg_passwd))) { |
40 | g->hashed_password = strv_new(sgrp->sg_passwd); | 41 | g->hashed_password = strv_new(sgrp->sg_passwd); |
41 | @@ -363,6 +366,7 @@ int nss_group_to_group_record( | 42 | @@ -361,6 +364,7 @@ int nss_group_to_group_record( |
42 | if (r < 0) | 43 | if (r < 0) |
43 | return r; | 44 | return r; |
44 | } | 45 | } |
@@ -46,7 +47,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
46 | 47 | ||
47 | r = json_build(&g->json, JSON_BUILD_OBJECT( | 48 | r = json_build(&g->json, JSON_BUILD_OBJECT( |
48 | JSON_BUILD_PAIR("groupName", JSON_BUILD_STRING(g->group_name)), | 49 | JSON_BUILD_PAIR("groupName", JSON_BUILD_STRING(g->group_name)), |
49 | @@ -388,6 +392,7 @@ int nss_sgrp_for_group(const struct grou | 50 | @@ -387,6 +391,7 @@ int nss_sgrp_for_group(const struct group *grp, struct sgrp *ret_sgrp, char **re |
50 | assert(ret_sgrp); | 51 | assert(ret_sgrp); |
51 | assert(ret_buffer); | 52 | assert(ret_buffer); |
52 | 53 | ||
@@ -54,7 +55,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
54 | for (;;) { | 55 | for (;;) { |
55 | _cleanup_free_ char *buf = NULL; | 56 | _cleanup_free_ char *buf = NULL; |
56 | struct sgrp sgrp, *result; | 57 | struct sgrp sgrp, *result; |
57 | @@ -416,6 +421,9 @@ int nss_sgrp_for_group(const struct grou | 58 | @@ -415,6 +420,9 @@ int nss_sgrp_for_group(const struct group *grp, struct sgrp *ret_sgrp, char **re |
58 | buflen *= 2; | 59 | buflen *= 2; |
59 | buf = mfree(buf); | 60 | buf = mfree(buf); |
60 | } | 61 | } |
@@ -64,7 +65,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
64 | } | 65 | } |
65 | 66 | ||
66 | int nss_group_record_by_name( | 67 | int nss_group_record_by_name( |
67 | @@ -427,7 +435,9 @@ int nss_group_record_by_name( | 68 | @@ -426,7 +434,9 @@ int nss_group_record_by_name( |
68 | struct group grp, *result; | 69 | struct group grp, *result; |
69 | bool incomplete = false; | 70 | bool incomplete = false; |
70 | size_t buflen = 4096; | 71 | size_t buflen = 4096; |
@@ -74,7 +75,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
74 | int r; | 75 | int r; |
75 | 76 | ||
76 | assert(name); | 77 | assert(name); |
77 | @@ -457,6 +467,7 @@ int nss_group_record_by_name( | 78 | @@ -455,6 +465,7 @@ int nss_group_record_by_name( |
78 | buf = mfree(buf); | 79 | buf = mfree(buf); |
79 | } | 80 | } |
80 | 81 | ||
@@ -82,7 +83,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
82 | if (with_shadow) { | 83 | if (with_shadow) { |
83 | r = nss_sgrp_for_group(result, &sgrp, &sbuf); | 84 | r = nss_sgrp_for_group(result, &sgrp, &sbuf); |
84 | if (r < 0) { | 85 | if (r < 0) { |
85 | @@ -468,6 +479,9 @@ int nss_group_record_by_name( | 86 | @@ -466,6 +477,9 @@ int nss_group_record_by_name( |
86 | incomplete = true; | 87 | incomplete = true; |
87 | 88 | ||
88 | r = nss_group_to_group_record(result, sresult, ret); | 89 | r = nss_group_to_group_record(result, sresult, ret); |
@@ -92,7 +93,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
92 | if (r < 0) | 93 | if (r < 0) |
93 | return r; | 94 | return r; |
94 | 95 | ||
95 | @@ -484,7 +498,9 @@ int nss_group_record_by_gid( | 96 | @@ -483,7 +497,9 @@ int nss_group_record_by_gid( |
96 | struct group grp, *result; | 97 | struct group grp, *result; |
97 | bool incomplete = false; | 98 | bool incomplete = false; |
98 | size_t buflen = 4096; | 99 | size_t buflen = 4096; |
@@ -101,8 +102,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
101 | +#endif | 102 | +#endif |
102 | int r; | 103 | int r; |
103 | 104 | ||
104 | assert(ret); | 105 | for (;;) { |
105 | @@ -512,6 +528,7 @@ int nss_group_record_by_gid( | 106 | @@ -509,6 +525,7 @@ int nss_group_record_by_gid( |
106 | buf = mfree(buf); | 107 | buf = mfree(buf); |
107 | } | 108 | } |
108 | 109 | ||
@@ -110,7 +111,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
110 | if (with_shadow) { | 111 | if (with_shadow) { |
111 | r = nss_sgrp_for_group(result, &sgrp, &sbuf); | 112 | r = nss_sgrp_for_group(result, &sgrp, &sbuf); |
112 | if (r < 0) { | 113 | if (r < 0) { |
113 | @@ -523,6 +540,9 @@ int nss_group_record_by_gid( | 114 | @@ -520,6 +537,9 @@ int nss_group_record_by_gid( |
114 | incomplete = true; | 115 | incomplete = true; |
115 | 116 | ||
116 | r = nss_group_to_group_record(result, sresult, ret); | 117 | r = nss_group_to_group_record(result, sresult, ret); |
@@ -120,6 +121,8 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
120 | if (r < 0) | 121 | if (r < 0) |
121 | return r; | 122 | return r; |
122 | 123 | ||
124 | diff --git a/src/shared/user-record-nss.h b/src/shared/user-record-nss.h | ||
125 | index 22ab04d6ee..4e52e7a911 100644 | ||
123 | --- a/src/shared/user-record-nss.h | 126 | --- a/src/shared/user-record-nss.h |
124 | +++ b/src/shared/user-record-nss.h | 127 | +++ b/src/shared/user-record-nss.h |
125 | @@ -2,7 +2,11 @@ | 128 | @@ -2,7 +2,11 @@ |
@@ -134,9 +137,11 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
134 | #include <pwd.h> | 137 | #include <pwd.h> |
135 | #include <shadow.h> | 138 | #include <shadow.h> |
136 | 139 | ||
140 | diff --git a/src/shared/userdb.c b/src/shared/userdb.c | ||
141 | index a77eff4407..955e361d3a 100644 | ||
137 | --- a/src/shared/userdb.c | 142 | --- a/src/shared/userdb.c |
138 | +++ b/src/shared/userdb.c | 143 | +++ b/src/shared/userdb.c |
139 | @@ -1046,13 +1046,15 @@ int groupdb_iterator_get(UserDBIterator | 144 | @@ -1038,13 +1038,15 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) { |
140 | if (gr) { | 145 | if (gr) { |
141 | _cleanup_free_ char *buffer = NULL; | 146 | _cleanup_free_ char *buffer = NULL; |
142 | bool incomplete = false; | 147 | bool incomplete = false; |
@@ -153,7 +158,7 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
153 | if (!FLAGS_SET(iterator->flags, USERDB_SUPPRESS_SHADOW)) { | 158 | if (!FLAGS_SET(iterator->flags, USERDB_SUPPRESS_SHADOW)) { |
154 | r = nss_sgrp_for_group(gr, &sgrp, &buffer); | 159 | r = nss_sgrp_for_group(gr, &sgrp, &buffer); |
155 | if (r < 0) { | 160 | if (r < 0) { |
156 | @@ -1065,6 +1067,9 @@ int groupdb_iterator_get(UserDBIterator | 161 | @@ -1057,6 +1059,9 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) { |
157 | } | 162 | } |
158 | 163 | ||
159 | r = nss_group_to_group_record(gr, r >= 0 ? &sgrp : NULL, ret); | 164 | r = nss_group_to_group_record(gr, r >= 0 ? &sgrp : NULL, ret); |
@@ -163,3 +168,6 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
163 | if (r < 0) | 168 | if (r < 0) |
164 | return r; | 169 | return r; |
165 | 170 | ||
171 | -- | ||
172 | 2.39.2 | ||
173 | |||
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0024-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch index 700a04a26..d64cec158 100644 --- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch +++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0024-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch | |||
@@ -1,4 +1,4 @@ | |||
1 | From 6f0dd2ba75b68036d7b4ebfe47ac5eaf44d26f06 Mon Sep 17 00:00:00 2001 | 1 | From a2f56a2a6cdd5137bb1e680aa9f6c40540107166 Mon Sep 17 00:00:00 2001 |
2 | From: Khem Raj <raj.khem@gmail.com> | 2 | From: Khem Raj <raj.khem@gmail.com> |
3 | Date: Mon, 12 Apr 2021 23:44:53 -0700 | 3 | Date: Mon, 12 Apr 2021 23:44:53 -0700 |
4 | Subject: [PATCH] missing_syscall.h: Define MIPS ABI defines for musl | 4 | Subject: [PATCH] missing_syscall.h: Define MIPS ABI defines for musl |
@@ -10,11 +10,13 @@ them here in case they are undefined | |||
10 | Upstream-Status: Pending | 10 | Upstream-Status: Pending |
11 | 11 | ||
12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | 12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
13 | |||
14 | --- | 13 | --- |
15 | src/basic/missing_syscall.h | 6 ++++++ | 14 | src/basic/missing_syscall.h | 6 ++++++ |
16 | 1 file changed, 6 insertions(+) | 15 | src/shared/base-filesystem.c | 1 + |
16 | 2 files changed, 7 insertions(+) | ||
17 | 17 | ||
18 | diff --git a/src/basic/missing_syscall.h b/src/basic/missing_syscall.h | ||
19 | index 98cd037962..ea6a76c2e2 100644 | ||
18 | --- a/src/basic/missing_syscall.h | 20 | --- a/src/basic/missing_syscall.h |
19 | +++ b/src/basic/missing_syscall.h | 21 | +++ b/src/basic/missing_syscall.h |
20 | @@ -20,6 +20,12 @@ | 22 | @@ -20,6 +20,12 @@ |
@@ -30,3 +32,18 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
30 | #include "macro.h" | 32 | #include "macro.h" |
31 | #include "missing_keyctl.h" | 33 | #include "missing_keyctl.h" |
32 | #include "missing_stat.h" | 34 | #include "missing_stat.h" |
35 | diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c | ||
36 | index 2726dc946a..484f63e0b4 100644 | ||
37 | --- a/src/shared/base-filesystem.c | ||
38 | +++ b/src/shared/base-filesystem.c | ||
39 | @@ -20,6 +20,7 @@ | ||
40 | #include "string-util.h" | ||
41 | #include "umask-util.h" | ||
42 | #include "user-util.h" | ||
43 | +#include "missing_syscall.h" | ||
44 | |||
45 | typedef struct BaseFilesystem { | ||
46 | const char *dir; /* directory or symlink to create */ | ||
47 | -- | ||
48 | 2.39.2 | ||
49 | |||
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0028-sd-event-Make-malloc_trim-conditional-on-glibc.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0028-sd-event-Make-malloc_trim-conditional-on-glibc.patch new file mode 100644 index 000000000..c9ec00012 --- /dev/null +++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0028-sd-event-Make-malloc_trim-conditional-on-glibc.patch | |||
@@ -0,0 +1,39 @@ | |||
1 | From 148645ba8b62f04c7c5ff5907378663f97880f22 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 2 Aug 2023 12:06:27 -0700 | ||
4 | Subject: [PATCH 1/4] sd-event: Make malloc_trim() conditional on glibc | ||
5 | |||
6 | musl does not have this API | ||
7 | |||
8 | Upstream-Status: Inappropriate [musl-specific] | ||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | src/libsystemd/sd-event/sd-event.c | 4 +++- | ||
12 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
13 | |||
14 | diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c | ||
15 | index aba458185b..48c94a7672 100644 | ||
16 | --- a/src/libsystemd/sd-event/sd-event.c | ||
17 | +++ b/src/libsystemd/sd-event/sd-event.c | ||
18 | @@ -1874,7 +1874,7 @@ _public_ int sd_event_add_exit( | ||
19 | } | ||
20 | |||
21 | _public_ int sd_event_trim_memory(void) { | ||
22 | - int r; | ||
23 | + int r = 0; | ||
24 | |||
25 | /* A default implementation of a memory pressure callback. Simply releases our own allocation caches | ||
26 | * and glibc's. This is automatically used when people call sd_event_add_memory_pressure() with a | ||
27 | @@ -1888,7 +1888,9 @@ _public_ int sd_event_trim_memory(void) { | ||
28 | |||
29 | usec_t before_timestamp = now(CLOCK_MONOTONIC); | ||
30 | hashmap_trim_pools(); | ||
31 | +#ifdef __GLIBC__ | ||
32 | r = malloc_trim(0); | ||
33 | +#endif | ||
34 | usec_t after_timestamp = now(CLOCK_MONOTONIC); | ||
35 | |||
36 | if (r > 0) | ||
37 | -- | ||
38 | 2.41.0 | ||
39 | |||
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0029-shared-Do-not-use-malloc_info-on-musl.patch b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0029-shared-Do-not-use-malloc_info-on-musl.patch new file mode 100644 index 000000000..8e386551a --- /dev/null +++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd/0029-shared-Do-not-use-malloc_info-on-musl.patch | |||
@@ -0,0 +1,50 @@ | |||
1 | From 9430646e72ea5d260ade300038a6d976fecf7da5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 2 Aug 2023 12:20:40 -0700 | ||
4 | Subject: [PATCH 4/4] shared: Do not use malloc_info on musl | ||
5 | |||
6 | Upstream-Status: Inappropriate [musl-specific] | ||
7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
8 | --- | ||
9 | src/shared/bus-util.c | 5 +++-- | ||
10 | src/shared/common-signal.c | 4 ++-- | ||
11 | 2 files changed, 5 insertions(+), 4 deletions(-) | ||
12 | |||
13 | --- a/src/shared/bus-util.c | ||
14 | +++ b/src/shared/bus-util.c | ||
15 | @@ -617,15 +617,16 @@ static int method_dump_memory_state_by_f | ||
16 | _cleanup_close_ int fd = -EBADF; | ||
17 | size_t dump_size; | ||
18 | FILE *f; | ||
19 | - int r; | ||
20 | + int r = 0; | ||
21 | |||
22 | assert(message); | ||
23 | |||
24 | f = memstream_init(&m); | ||
25 | if (!f) | ||
26 | return -ENOMEM; | ||
27 | - | ||
28 | +#ifdef __GLIBC__ | ||
29 | r = RET_NERRNO(malloc_info(/* options= */ 0, f)); | ||
30 | +#endif | ||
31 | if (r < 0) | ||
32 | return r; | ||
33 | |||
34 | --- a/src/shared/common-signal.c | ||
35 | +++ b/src/shared/common-signal.c | ||
36 | @@ -65,12 +65,12 @@ int sigrtmin18_handler(sd_event_source * | ||
37 | log_oom(); | ||
38 | break; | ||
39 | } | ||
40 | - | ||
41 | +#ifdef __GLIBC__ | ||
42 | if (malloc_info(0, f) < 0) { | ||
43 | log_error_errno(errno, "Failed to invoke malloc_info(): %m"); | ||
44 | break; | ||
45 | } | ||
46 | - | ||
47 | +#endif | ||
48 | (void) memstream_dump(LOG_INFO, &m); | ||
49 | break; | ||
50 | } | ||
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd_250.9.bb b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd_250.9.bb deleted file mode 100644 index 14e927d07..000000000 --- a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd_250.9.bb +++ /dev/null | |||
@@ -1,79 +0,0 @@ | |||
1 | SUMMARY = "libsystemd static library" | ||
2 | DESCRIPTION = "libsystemd static library built specifically as an integral component of sdbus-c++" | ||
3 | |||
4 | SECTION = "libs" | ||
5 | |||
6 | LICENSE = "LGPL-2.1-or-later" | ||
7 | LIC_FILES_CHKSUM = "file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c" | ||
8 | |||
9 | inherit meson pkgconfig | ||
10 | |||
11 | DEPENDS += "gperf-native gettext-native util-linux libcap util-linux python3-jinja2-native" | ||
12 | |||
13 | SRCREV = "1d5e0e9910500f3c3584485f77bfc35e601036e3" | ||
14 | SRCBRANCH = "v250-stable" | ||
15 | SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=https;branch=${SRCBRANCH} \ | ||
16 | file://static-libsystemd-pkgconfig.patch \ | ||
17 | file://0001-dirent-util-Remove-asserts-on-dirent64-dirent.patch \ | ||
18 | " | ||
19 | |||
20 | # patches needed by musl | ||
21 | SRC_URI:append:libc-musl = " ${SRC_URI_MUSL}" | ||
22 | |||
23 | SRC_URI_MUSL = "\ | ||
24 | file://0002-don-t-use-glibc-specific-qsort_r.patch \ | ||
25 | file://0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch \ | ||
26 | file://0004-add-fallback-parse_printf_format-implementation.patch \ | ||
27 | file://0005-src-basic-missing.h-check-for-missing-strndupa.patch \ | ||
28 | file://0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch \ | ||
29 | file://0008-add-missing-FTW_-macros-for-musl.patch \ | ||
30 | file://0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch \ | ||
31 | file://0010-Use-uintmax_t-for-handling-rlim_t.patch \ | ||
32 | file://0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch \ | ||
33 | file://0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch \ | ||
34 | file://0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch \ | ||
35 | file://0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch \ | ||
36 | file://0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch \ | ||
37 | file://0016-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch \ | ||
38 | file://0017-missing_type.h-add-__compar_d_fn_t-definition.patch \ | ||
39 | file://0018-avoid-redefinition-of-prctl_mm_map-structure.patch \ | ||
40 | file://0019-Handle-missing-LOCK_EX.patch \ | ||
41 | file://0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch \ | ||
42 | file://0021-test-json.c-define-M_PIl.patch \ | ||
43 | file://0022-do-not-disable-buffer-in-writing-files.patch \ | ||
44 | file://0025-Handle-__cpu_mask-usage.patch \ | ||
45 | file://0026-Handle-missing-gshadow.patch \ | ||
46 | file://0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch \ | ||
47 | file://0002-Add-sys-stat.h-for-S_IFDIR.patch \ | ||
48 | file://0001-Adjust-for-musl-headers.patch \ | ||
49 | " | ||
50 | |||
51 | PACKAGECONFIG ??= "gshadow idn" | ||
52 | PACKAGECONFIG:remove:libc-musl = " gshadow idn" | ||
53 | PACKAGECONFIG[gshadow] = "-Dgshadow=true,-Dgshadow=false" | ||
54 | PACKAGECONFIG[idn] = "-Didn=true,-Didn=false" | ||
55 | |||
56 | CFLAGS:append:libc-musl = " -D__UAPI_DEF_ETHHDR=0 " | ||
57 | |||
58 | EXTRA_OEMESON += "-Dstatic-libsystemd=pic" | ||
59 | |||
60 | S = "${WORKDIR}/git" | ||
61 | |||
62 | RDEPENDS:${PN}-dev = "" | ||
63 | |||
64 | do_compile() { | ||
65 | ninja -v ${PARALLEL_MAKE} version.h | ||
66 | ninja -v ${PARALLEL_MAKE} libsystemd.a | ||
67 | ninja -v ${PARALLEL_MAKE} src/libsystemd/libsystemd.pc | ||
68 | } | ||
69 | |||
70 | do_install () { | ||
71 | install -d ${D}${libdir} | ||
72 | install ${B}/libsystemd.a ${D}${libdir} | ||
73 | |||
74 | install -d ${D}${includedir}/systemd | ||
75 | install ${S}/src/systemd/*.h ${D}${includedir}/systemd | ||
76 | |||
77 | install -d ${D}${libdir}/pkgconfig | ||
78 | install ${B}/src/libsystemd/libsystemd.pc ${D}${libdir}/pkgconfig | ||
79 | } | ||
diff --git a/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd_254.4.bb b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd_254.4.bb new file mode 100644 index 000000000..0b211948c --- /dev/null +++ b/meta-oe/recipes-core/sdbus-c++/sdbus-c++-libsystemd_254.4.bb | |||
@@ -0,0 +1,74 @@ | |||
1 | SUMMARY = "libsystemd static library" | ||
2 | DESCRIPTION = "libsystemd static library built specifically as an integral component of sdbus-c++" | ||
3 | |||
4 | SECTION = "libs" | ||
5 | |||
6 | LICENSE = "LGPL-2.1-or-later" | ||
7 | LIC_FILES_CHKSUM = "file://LICENSE.LGPL2.1;md5=4fbd65380cdd255951079008b364516c" | ||
8 | |||
9 | inherit meson pkgconfig | ||
10 | |||
11 | DEPENDS += "gperf-native gettext-native util-linux libcap util-linux python3-jinja2-native" | ||
12 | |||
13 | SRCREV = "2e7504449a51fb38db9cd2da391c6434f82def51" | ||
14 | SRCBRANCH = "v254-stable" | ||
15 | SRC_URI = "git://github.com/systemd/systemd-stable.git;protocol=https;branch=${SRCBRANCH} \ | ||
16 | file://static-libsystemd-pkgconfig.patch \ | ||
17 | " | ||
18 | |||
19 | # patches needed by musl | ||
20 | SRC_URI:append:libc-musl = " ${SRC_URI_MUSL}" | ||
21 | |||
22 | SRC_URI_MUSL = "\ | ||
23 | file://0009-missing_type.h-add-comparison_fn_t.patch \ | ||
24 | file://0010-add-fallback-parse_printf_format-implementation.patch \ | ||
25 | file://0011-src-basic-missing.h-check-for-missing-strndupa.patch \ | ||
26 | file://0012-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch \ | ||
27 | file://0013-add-missing-FTW_-macros-for-musl.patch \ | ||
28 | file://0014-Use-uintmax_t-for-handling-rlim_t.patch \ | ||
29 | file://0016-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch \ | ||
30 | file://0017-Define-glibc-compatible-basename-for-non-glibc-syste.patch \ | ||
31 | file://0018-Do-not-disable-buffering-when-writing-to-oom_score_a.patch \ | ||
32 | file://0019-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch \ | ||
33 | file://0020-avoid-redefinition-of-prctl_mm_map-structure.patch \ | ||
34 | file://0021-do-not-disable-buffer-in-writing-files.patch \ | ||
35 | file://0022-Handle-__cpu_mask-usage.patch \ | ||
36 | file://0023-Handle-missing-gshadow.patch \ | ||
37 | file://0024-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch \ | ||
38 | file://0005-pass-correct-parameters-to-getdents64.patch \ | ||
39 | file://0001-Adjust-for-musl-headers.patch \ | ||
40 | file://0006-test-bus-error-strerror-is-assumed-to-be-GNU-specifi.patch \ | ||
41 | file://0003-errno-util-Make-STRERROR-portable-for-musl.patch \ | ||
42 | file://0028-sd-event-Make-malloc_trim-conditional-on-glibc.patch \ | ||
43 | file://0029-shared-Do-not-use-malloc_info-on-musl.patch \ | ||
44 | " | ||
45 | |||
46 | PACKAGECONFIG ??= "gshadow idn" | ||
47 | PACKAGECONFIG:remove:libc-musl = " gshadow idn" | ||
48 | PACKAGECONFIG[gshadow] = "-Dgshadow=true,-Dgshadow=false" | ||
49 | PACKAGECONFIG[idn] = "-Didn=true,-Didn=false" | ||
50 | |||
51 | CFLAGS:append:libc-musl = " -D__UAPI_DEF_ETHHDR=0 " | ||
52 | |||
53 | EXTRA_OEMESON += "-Dstatic-libsystemd=pic" | ||
54 | |||
55 | S = "${WORKDIR}/git" | ||
56 | |||
57 | RDEPENDS:${PN}-dev = "" | ||
58 | |||
59 | do_compile() { | ||
60 | ninja -v ${PARALLEL_MAKE} version.h | ||
61 | ninja -v ${PARALLEL_MAKE} libsystemd.a | ||
62 | ninja -v ${PARALLEL_MAKE} src/libsystemd/libsystemd.pc | ||
63 | } | ||
64 | |||
65 | do_install () { | ||
66 | install -d ${D}${libdir} | ||
67 | install ${B}/libsystemd.a ${D}${libdir} | ||
68 | |||
69 | install -d ${D}${includedir}/systemd | ||
70 | install ${S}/src/systemd/*.h ${D}${includedir}/systemd | ||
71 | |||
72 | install -d ${D}${libdir}/pkgconfig | ||
73 | install ${B}/src/libsystemd/libsystemd.pc ${D}${libdir}/pkgconfig | ||
74 | } | ||