diff options
22 files changed, 809 insertions, 772 deletions
diff --git a/meta/recipes-core/systemd/systemd/0001-Adjust-for-musl-headers.patch b/meta/recipes-core/systemd/systemd/0001-Adjust-for-musl-headers.patch new file mode 100644 index 0000000000..2363679c98 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0001-Adjust-for-musl-headers.patch | |||
| @@ -0,0 +1,453 @@ | |||
| 1 | From 4c2e932664ec67662f4a0306cca4a7cd82853bda Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Fri, 21 Jan 2022 22:19:37 -0800 | ||
| 4 | Subject: [PATCH] Adjust for musl headers | ||
| 5 | |||
| 6 | Upstream-Status: Inappropriate [musl specific] | ||
| 7 | |||
| 8 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 9 | --- | ||
| 10 | src/libsystemd-network/sd-dhcp6-client.c | 2 +- | ||
| 11 | src/network/netdev/bareudp.c | 2 +- | ||
| 12 | src/network/netdev/batadv.c | 2 +- | ||
| 13 | src/network/netdev/bond.c | 2 +- | ||
| 14 | src/network/netdev/bridge.c | 2 +- | ||
| 15 | src/network/netdev/dummy.c | 2 +- | ||
| 16 | src/network/netdev/geneve.c | 2 +- | ||
| 17 | src/network/netdev/ifb.c | 2 +- | ||
| 18 | src/network/netdev/ipoib.c | 2 +- | ||
| 19 | src/network/netdev/ipvlan.c | 2 +- | ||
| 20 | src/network/netdev/macsec.c | 2 +- | ||
| 21 | src/network/netdev/macvlan.c | 2 +- | ||
| 22 | src/network/netdev/netdev.c | 2 +- | ||
| 23 | src/network/netdev/netdevsim.c | 2 +- | ||
| 24 | src/network/netdev/nlmon.c | 2 +- | ||
| 25 | src/network/netdev/tunnel.c | 2 +- | ||
| 26 | src/network/netdev/vcan.c | 2 +- | ||
| 27 | src/network/netdev/veth.c | 2 +- | ||
| 28 | src/network/netdev/vlan.c | 2 +- | ||
| 29 | src/network/netdev/vrf.c | 2 +- | ||
| 30 | src/network/netdev/vxcan.c | 2 +- | ||
| 31 | src/network/netdev/vxlan.c | 2 +- | ||
| 32 | src/network/netdev/xfrm.c | 2 +- | ||
| 33 | src/network/networkd-bridge-mdb.c | 4 ++-- | ||
| 34 | src/network/networkd-dhcp-common.c | 3 ++- | ||
| 35 | src/network/networkd-dhcp-prefix-delegation.c | 4 ++-- | ||
| 36 | src/network/networkd-dhcp-server.c | 2 +- | ||
| 37 | src/network/networkd-dhcp4.c | 2 +- | ||
| 38 | src/network/networkd-link.c | 2 +- | ||
| 39 | src/network/networkd-route.c | 8 ++++---- | ||
| 40 | src/network/networkd-setlink.c | 2 +- | ||
| 41 | src/shared/linux/ethtool.h | 3 ++- | ||
| 42 | src/shared/netif-util.c | 2 +- | ||
| 43 | src/udev/udev-builtin-net_id.c | 2 +- | ||
| 44 | 34 files changed, 41 insertions(+), 39 deletions(-) | ||
| 45 | |||
| 46 | --- a/src/libsystemd-network/sd-dhcp6-client.c | ||
| 47 | +++ b/src/libsystemd-network/sd-dhcp6-client.c | ||
| 48 | @@ -5,7 +5,7 @@ | ||
| 49 | |||
| 50 | #include <errno.h> | ||
| 51 | #include <sys/ioctl.h> | ||
| 52 | -#include <linux/if_arp.h> | ||
| 53 | +//#include <linux/if_arp.h> | ||
| 54 | #include <linux/if_infiniband.h> | ||
| 55 | |||
| 56 | #include "sd-dhcp6-client.h" | ||
| 57 | --- a/src/network/netdev/bareudp.c | ||
| 58 | +++ b/src/network/netdev/bareudp.c | ||
| 59 | @@ -2,7 +2,7 @@ | ||
| 60 | * Copyright © 2020 VMware, Inc. */ | ||
| 61 | |||
| 62 | #include <netinet/in.h> | ||
| 63 | -#include <linux/if_arp.h> | ||
| 64 | +//#include <linux/if_arp.h> | ||
| 65 | |||
| 66 | #include "bareudp.h" | ||
| 67 | #include "netlink-util.h" | ||
| 68 | --- a/src/network/netdev/batadv.c | ||
| 69 | +++ b/src/network/netdev/batadv.c | ||
| 70 | @@ -3,7 +3,7 @@ | ||
| 71 | #include <inttypes.h> | ||
| 72 | #include <netinet/in.h> | ||
| 73 | #include <linux/genetlink.h> | ||
| 74 | -#include <linux/if_arp.h> | ||
| 75 | +//#include <linux/if_arp.h> | ||
| 76 | |||
| 77 | #include "batadv.h" | ||
| 78 | #include "fileio.h" | ||
| 79 | --- a/src/network/netdev/bond.c | ||
| 80 | +++ b/src/network/netdev/bond.c | ||
| 81 | @@ -1,7 +1,7 @@ | ||
| 82 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
| 83 | |||
| 84 | #include <netinet/in.h> | ||
| 85 | -#include <linux/if_arp.h> | ||
| 86 | +//#include <linux/if_arp.h> | ||
| 87 | |||
| 88 | #include "alloc-util.h" | ||
| 89 | #include "bond.h" | ||
| 90 | --- a/src/network/netdev/bridge.c | ||
| 91 | +++ b/src/network/netdev/bridge.c | ||
| 92 | @@ -2,7 +2,7 @@ | ||
| 93 | |||
| 94 | #include <net/if.h> | ||
| 95 | #include <netinet/in.h> | ||
| 96 | -#include <linux/if_arp.h> | ||
| 97 | +//#include <linux/if_arp.h> | ||
| 98 | #include <linux/if_bridge.h> | ||
| 99 | |||
| 100 | #include "bridge.h" | ||
| 101 | --- a/src/network/netdev/dummy.c | ||
| 102 | +++ b/src/network/netdev/dummy.c | ||
| 103 | @@ -1,6 +1,6 @@ | ||
| 104 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
| 105 | |||
| 106 | -#include <linux/if_arp.h> | ||
| 107 | +//#include <linux/if_arp.h> | ||
| 108 | |||
| 109 | #include "dummy.h" | ||
| 110 | |||
| 111 | --- a/src/network/netdev/geneve.c | ||
| 112 | +++ b/src/network/netdev/geneve.c | ||
| 113 | @@ -2,7 +2,7 @@ | ||
| 114 | |||
| 115 | #include <net/if.h> | ||
| 116 | #include <netinet/in.h> | ||
| 117 | -#include <linux/if_arp.h> | ||
| 118 | +//#include <linux/if_arp.h> | ||
| 119 | |||
| 120 | #include "alloc-util.h" | ||
| 121 | #include "conf-parser.h" | ||
| 122 | --- a/src/network/netdev/ifb.c | ||
| 123 | +++ b/src/network/netdev/ifb.c | ||
| 124 | @@ -1,7 +1,7 @@ | ||
| 125 | /* SPDX-License-Identifier: LGPL-2.1-or-later | ||
| 126 | * Copyright © 2019 VMware, Inc. */ | ||
| 127 | |||
| 128 | -#include <linux/if_arp.h> | ||
| 129 | +//#include <linux/if_arp.h> | ||
| 130 | |||
| 131 | #include "ifb.h" | ||
| 132 | |||
| 133 | --- a/src/network/netdev/ipoib.c | ||
| 134 | +++ b/src/network/netdev/ipoib.c | ||
| 135 | @@ -1,6 +1,6 @@ | ||
| 136 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
| 137 | |||
| 138 | -#include <linux/if_arp.h> | ||
| 139 | +//#include <linux/if_arp.h> | ||
| 140 | #include <linux/if_link.h> | ||
| 141 | |||
| 142 | #include "ipoib.h" | ||
| 143 | --- a/src/network/netdev/ipvlan.c | ||
| 144 | +++ b/src/network/netdev/ipvlan.c | ||
| 145 | @@ -2,7 +2,7 @@ | ||
| 146 | |||
| 147 | #include <net/if.h> | ||
| 148 | #include <netinet/in.h> | ||
| 149 | -#include <linux/if_arp.h> | ||
| 150 | +//#include <linux/if_arp.h> | ||
| 151 | |||
| 152 | #include "conf-parser.h" | ||
| 153 | #include "ipvlan.h" | ||
| 154 | --- a/src/network/netdev/macsec.c | ||
| 155 | +++ b/src/network/netdev/macsec.c | ||
| 156 | @@ -1,7 +1,7 @@ | ||
| 157 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
| 158 | |||
| 159 | #include <netinet/in.h> | ||
| 160 | -#include <linux/if_arp.h> | ||
| 161 | +//#include <linux/if_arp.h> | ||
| 162 | #include <linux/if_ether.h> | ||
| 163 | #include <linux/if_macsec.h> | ||
| 164 | #include <linux/genetlink.h> | ||
| 165 | --- a/src/network/netdev/macvlan.c | ||
| 166 | +++ b/src/network/netdev/macvlan.c | ||
| 167 | @@ -2,7 +2,7 @@ | ||
| 168 | |||
| 169 | #include <net/if.h> | ||
| 170 | #include <netinet/in.h> | ||
| 171 | -#include <linux/if_arp.h> | ||
| 172 | +//#include <linux/if_arp.h> | ||
| 173 | |||
| 174 | #include "conf-parser.h" | ||
| 175 | #include "macvlan.h" | ||
| 176 | --- a/src/network/netdev/netdev.c | ||
| 177 | +++ b/src/network/netdev/netdev.c | ||
| 178 | @@ -2,7 +2,7 @@ | ||
| 179 | |||
| 180 | #include <net/if.h> | ||
| 181 | #include <netinet/in.h> | ||
| 182 | -#include <linux/if_arp.h> | ||
| 183 | +//#include <linux/if_arp.h> | ||
| 184 | #include <unistd.h> | ||
| 185 | |||
| 186 | #include "alloc-util.h" | ||
| 187 | --- a/src/network/netdev/netdevsim.c | ||
| 188 | +++ b/src/network/netdev/netdevsim.c | ||
| 189 | @@ -1,6 +1,6 @@ | ||
| 190 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
| 191 | |||
| 192 | -#include <linux/if_arp.h> | ||
| 193 | +//#include <linux/if_arp.h> | ||
| 194 | |||
| 195 | #include "netdevsim.h" | ||
| 196 | |||
| 197 | --- a/src/network/netdev/nlmon.c | ||
| 198 | +++ b/src/network/netdev/nlmon.c | ||
| 199 | @@ -1,6 +1,6 @@ | ||
| 200 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
| 201 | |||
| 202 | -#include <linux/if_arp.h> | ||
| 203 | +//#include <linux/if_arp.h> | ||
| 204 | |||
| 205 | #include "nlmon.h" | ||
| 206 | |||
| 207 | --- a/src/network/netdev/tunnel.c | ||
| 208 | +++ b/src/network/netdev/tunnel.c | ||
| 209 | @@ -2,7 +2,7 @@ | ||
| 210 | |||
| 211 | #include <netinet/in.h> | ||
| 212 | #include <linux/fou.h> | ||
| 213 | -#include <linux/if_arp.h> | ||
| 214 | +//#include <linux/if_arp.h> | ||
| 215 | #include <linux/if_tunnel.h> | ||
| 216 | #include <linux/ip.h> | ||
| 217 | #include <linux/ip6_tunnel.h> | ||
| 218 | --- a/src/network/netdev/vcan.c | ||
| 219 | +++ b/src/network/netdev/vcan.c | ||
| 220 | @@ -1,6 +1,6 @@ | ||
| 221 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
| 222 | |||
| 223 | -#include <linux/if_arp.h> | ||
| 224 | +//#include <linux/if_arp.h> | ||
| 225 | |||
| 226 | #include "vcan.h" | ||
| 227 | |||
| 228 | --- a/src/network/netdev/veth.c | ||
| 229 | +++ b/src/network/netdev/veth.c | ||
| 230 | @@ -3,7 +3,7 @@ | ||
| 231 | #include <errno.h> | ||
| 232 | #include <net/if.h> | ||
| 233 | #include <netinet/in.h> | ||
| 234 | -#include <linux/if_arp.h> | ||
| 235 | +//#include <linux/if_arp.h> | ||
| 236 | #include <linux/veth.h> | ||
| 237 | |||
| 238 | #include "netlink-util.h" | ||
| 239 | --- a/src/network/netdev/vlan.c | ||
| 240 | +++ b/src/network/netdev/vlan.c | ||
| 241 | @@ -2,7 +2,7 @@ | ||
| 242 | |||
| 243 | #include <errno.h> | ||
| 244 | #include <net/if.h> | ||
| 245 | -#include <linux/if_arp.h> | ||
| 246 | +//#include <linux/if_arp.h> | ||
| 247 | #include <linux/if_vlan.h> | ||
| 248 | |||
| 249 | #include "parse-util.h" | ||
| 250 | --- a/src/network/netdev/vrf.c | ||
| 251 | +++ b/src/network/netdev/vrf.c | ||
| 252 | @@ -2,7 +2,7 @@ | ||
| 253 | |||
| 254 | #include <net/if.h> | ||
| 255 | #include <netinet/in.h> | ||
| 256 | -#include <linux/if_arp.h> | ||
| 257 | +//#include <linux/if_arp.h> | ||
| 258 | |||
| 259 | #include "vrf.h" | ||
| 260 | |||
| 261 | --- a/src/network/netdev/vxcan.c | ||
| 262 | +++ b/src/network/netdev/vxcan.c | ||
| 263 | @@ -1,7 +1,7 @@ | ||
| 264 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
| 265 | |||
| 266 | #include <linux/can/vxcan.h> | ||
| 267 | -#include <linux/if_arp.h> | ||
| 268 | +//#include <linux/if_arp.h> | ||
| 269 | |||
| 270 | #include "vxcan.h" | ||
| 271 | |||
| 272 | --- a/src/network/netdev/vxlan.c | ||
| 273 | +++ b/src/network/netdev/vxlan.c | ||
| 274 | @@ -2,7 +2,7 @@ | ||
| 275 | |||
| 276 | #include <net/if.h> | ||
| 277 | #include <netinet/in.h> | ||
| 278 | -#include <linux/if_arp.h> | ||
| 279 | +//#include <linux/if_arp.h> | ||
| 280 | |||
| 281 | #include "conf-parser.h" | ||
| 282 | #include "alloc-util.h" | ||
| 283 | --- a/src/network/netdev/xfrm.c | ||
| 284 | +++ b/src/network/netdev/xfrm.c | ||
| 285 | @@ -1,6 +1,6 @@ | ||
| 286 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
| 287 | |||
| 288 | -#include <linux/if_arp.h> | ||
| 289 | +//#include <linux/if_arp.h> | ||
| 290 | |||
| 291 | #include "missing_network.h" | ||
| 292 | #include "xfrm.h" | ||
| 293 | --- a/src/network/networkd-bridge-mdb.c | ||
| 294 | +++ b/src/network/networkd-bridge-mdb.c | ||
| 295 | @@ -1,7 +1,5 @@ | ||
| 296 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
| 297 | |||
| 298 | -#include <net/if.h> | ||
| 299 | -#include <linux/if_bridge.h> | ||
| 300 | |||
| 301 | #include "netlink-util.h" | ||
| 302 | #include "networkd-bridge-mdb.h" | ||
| 303 | @@ -11,6 +9,8 @@ | ||
| 304 | #include "networkd-queue.h" | ||
| 305 | #include "string-util.h" | ||
| 306 | #include "vlan-util.h" | ||
| 307 | +#include <net/if.h> | ||
| 308 | +#include <linux/if_bridge.h> | ||
| 309 | |||
| 310 | #define STATIC_BRIDGE_MDB_ENTRIES_PER_NETWORK_MAX 1024U | ||
| 311 | |||
| 312 | --- a/src/network/networkd-dhcp-common.c | ||
| 313 | +++ b/src/network/networkd-dhcp-common.c | ||
| 314 | @@ -1,7 +1,8 @@ | ||
| 315 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
| 316 | |||
| 317 | #include <netinet/in.h> | ||
| 318 | -#include <linux/if_arp.h> | ||
| 319 | +//#include <linux/if_arp.h> | ||
| 320 | +#include <net/if.h> | ||
| 321 | |||
| 322 | #include "bus-error.h" | ||
| 323 | #include "dhcp-identifier.h" | ||
| 324 | --- a/src/network/networkd-dhcp-prefix-delegation.c | ||
| 325 | +++ b/src/network/networkd-dhcp-prefix-delegation.c | ||
| 326 | @@ -1,7 +1,5 @@ | ||
| 327 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
| 328 | |||
| 329 | -#include <linux/ipv6_route.h> | ||
| 330 | - | ||
| 331 | #include "sd-dhcp6-client.h" | ||
| 332 | |||
| 333 | #include "hashmap.h" | ||
| 334 | @@ -21,6 +19,8 @@ | ||
| 335 | #include "strv.h" | ||
| 336 | #include "tunnel.h" | ||
| 337 | |||
| 338 | +#include <linux/ipv6_route.h> | ||
| 339 | + | ||
| 340 | bool link_dhcp_pd_is_enabled(Link *link) { | ||
| 341 | assert(link); | ||
| 342 | |||
| 343 | --- a/src/network/networkd-dhcp-server.c | ||
| 344 | +++ b/src/network/networkd-dhcp-server.c | ||
| 345 | @@ -1,7 +1,7 @@ | ||
| 346 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
| 347 | |||
| 348 | #include <netinet/in.h> | ||
| 349 | -#include <linux/if_arp.h> | ||
| 350 | +//#include <linux/if_arp.h> | ||
| 351 | #include <linux/if.h> | ||
| 352 | |||
| 353 | #include "sd-dhcp-server.h" | ||
| 354 | --- a/src/network/networkd-dhcp4.c | ||
| 355 | +++ b/src/network/networkd-dhcp4.c | ||
| 356 | @@ -3,7 +3,7 @@ | ||
| 357 | #include <netinet/in.h> | ||
| 358 | #include <netinet/ip.h> | ||
| 359 | #include <linux/if.h> | ||
| 360 | -#include <linux/if_arp.h> | ||
| 361 | +//#include <linux/if_arp.h> | ||
| 362 | |||
| 363 | #include "alloc-util.h" | ||
| 364 | #include "dhcp-client-internal.h" | ||
| 365 | --- a/src/network/networkd-link.c | ||
| 366 | +++ b/src/network/networkd-link.c | ||
| 367 | @@ -3,7 +3,7 @@ | ||
| 368 | #include <net/if.h> | ||
| 369 | #include <netinet/in.h> | ||
| 370 | #include <linux/if.h> | ||
| 371 | -#include <linux/if_arp.h> | ||
| 372 | +//#include <linux/if_arp.h> | ||
| 373 | #include <linux/if_link.h> | ||
| 374 | #include <linux/netdevice.h> | ||
| 375 | #include <sys/socket.h> | ||
| 376 | --- a/src/network/networkd-route.c | ||
| 377 | +++ b/src/network/networkd-route.c | ||
| 378 | @@ -1,9 +1,5 @@ | ||
| 379 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
| 380 | |||
| 381 | -#include <linux/icmpv6.h> | ||
| 382 | -#include <linux/ipv6_route.h> | ||
| 383 | -#include <linux/nexthop.h> | ||
| 384 | - | ||
| 385 | #include "alloc-util.h" | ||
| 386 | #include "event-util.h" | ||
| 387 | #include "netlink-util.h" | ||
| 388 | @@ -21,6 +17,10 @@ | ||
| 389 | #include "vrf.h" | ||
| 390 | #include "wireguard.h" | ||
| 391 | |||
| 392 | +#include <linux/icmpv6.h> | ||
| 393 | +#include <linux/ipv6_route.h> | ||
| 394 | +#include <linux/nexthop.h> | ||
| 395 | + | ||
| 396 | int route_new(Route **ret) { | ||
| 397 | _cleanup_(route_freep) Route *route = NULL; | ||
| 398 | |||
| 399 | --- a/src/network/networkd-setlink.c | ||
| 400 | +++ b/src/network/networkd-setlink.c | ||
| 401 | @@ -2,7 +2,7 @@ | ||
| 402 | |||
| 403 | #include <netinet/in.h> | ||
| 404 | #include <linux/if.h> | ||
| 405 | -#include <linux/if_arp.h> | ||
| 406 | +//#include <linux/if_arp.h> | ||
| 407 | #include <linux/if_bridge.h> | ||
| 408 | |||
| 409 | #include "missing_network.h" | ||
| 410 | --- a/src/shared/linux/ethtool.h | ||
| 411 | +++ b/src/shared/linux/ethtool.h | ||
| 412 | @@ -16,7 +16,8 @@ | ||
| 413 | |||
| 414 | #include <linux/kernel.h> | ||
| 415 | #include <linux/types.h> | ||
| 416 | -#include <linux/if_ether.h> | ||
| 417 | +#include <netinet/if_ether.h> | ||
| 418 | +//#include <linux/if_ether.h> | ||
| 419 | |||
| 420 | #ifndef __KERNEL__ | ||
| 421 | #include <limits.h> /* for INT_MAX */ | ||
| 422 | --- a/src/shared/netif-util.c | ||
| 423 | +++ b/src/shared/netif-util.c | ||
| 424 | @@ -1,6 +1,6 @@ | ||
| 425 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
| 426 | |||
| 427 | -#include <linux/if_arp.h> | ||
| 428 | +//#include <linux/if_arp.h> | ||
| 429 | |||
| 430 | #include "arphrd-util.h" | ||
| 431 | #include "device-util.h" | ||
| 432 | --- a/src/udev/udev-builtin-net_id.c | ||
| 433 | +++ b/src/udev/udev-builtin-net_id.c | ||
| 434 | @@ -18,7 +18,7 @@ | ||
| 435 | #include <stdarg.h> | ||
| 436 | #include <unistd.h> | ||
| 437 | #include <linux/if.h> | ||
| 438 | -#include <linux/if_arp.h> | ||
| 439 | +//#include <linux/if_arp.h> | ||
| 440 | #include <linux/netdevice.h> | ||
| 441 | #include <linux/pci_regs.h> | ||
| 442 | |||
| 443 | --- a/src/network/netdev/wireguard.c | ||
| 444 | +++ b/src/network/netdev/wireguard.c | ||
| 445 | @@ -6,7 +6,7 @@ | ||
| 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/recipes-core/systemd/systemd/0001-pass-correct-parameters-to-getdents64.patch b/meta/recipes-core/systemd/systemd/0001-pass-correct-parameters-to-getdents64.patch new file mode 100644 index 0000000000..03a29b5327 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0001-pass-correct-parameters-to-getdents64.patch | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | From fbc10748c7c59d82024a4d35146b8dfef8d52927 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 1/2] 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: Pending | ||
| 16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 17 | --- | ||
| 18 | src/basic/recurse-dir.c | 2 +- | ||
| 19 | src/basic/stat-util.c | 2 +- | ||
| 20 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
| 21 | |||
| 22 | diff --git a/src/basic/recurse-dir.c b/src/basic/recurse-dir.c | ||
| 23 | index efa1797b7b..797285e3be 100644 | ||
| 24 | --- a/src/basic/recurse-dir.c | ||
| 25 | +++ b/src/basic/recurse-dir.c | ||
| 26 | @@ -54,7 +54,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, de->buffer + de->buffer_size, bs - de->buffer_size); | ||
| 32 | if (n < 0) | ||
| 33 | return -errno; | ||
| 34 | if (n == 0) | ||
| 35 | diff --git a/src/basic/stat-util.c b/src/basic/stat-util.c | ||
| 36 | index efac7b002e..9e1fe7f5a0 100644 | ||
| 37 | --- a/src/basic/stat-util.c | ||
| 38 | +++ b/src/basic/stat-util.c | ||
| 39 | @@ -99,7 +99,7 @@ int dir_is_empty_at(int dir_fd, const char *path) { | ||
| 40 | return fd; | ||
| 41 | } | ||
| 42 | |||
| 43 | - n = getdents64(fd, &buffer, sizeof(buffer)); | ||
| 44 | + n = getdents64(fd, (struct dirent *)&buffer, sizeof(buffer)); | ||
| 45 | if (n < 0) | ||
| 46 | return -errno; | ||
| 47 | |||
| 48 | -- | ||
| 49 | 2.34.1 | ||
| 50 | |||
diff --git a/meta/recipes-core/systemd/systemd/0002-Add-sys-stat.h-for-S_IFDIR.patch b/meta/recipes-core/systemd/systemd/0002-Add-sys-stat.h-for-S_IFDIR.patch new file mode 100644 index 0000000000..7dfa1a0df2 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0002-Add-sys-stat.h-for-S_IFDIR.patch | |||
| @@ -0,0 +1,29 @@ | |||
| 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/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch b/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch index d03a1d9e76..5027682df2 100644 --- a/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch +++ b/meta/recipes-core/systemd/systemd/0002-don-t-use-glibc-specific-qsort_r.patch | |||
| @@ -19,15 +19,13 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
| 19 | src/shared/hwdb-util.c | 19 ++++++++++++++----- | 19 | src/shared/hwdb-util.c | 19 ++++++++++++++----- |
| 20 | 3 files changed, 38 insertions(+), 31 deletions(-) | 20 | 3 files changed, 38 insertions(+), 31 deletions(-) |
| 21 | 21 | ||
| 22 | diff --git a/src/basic/sort-util.h b/src/basic/sort-util.h | ||
| 23 | index 49586a4a24..d92a5ab0ed 100644 | ||
| 24 | --- a/src/basic/sort-util.h | 22 | --- a/src/basic/sort-util.h |
| 25 | +++ b/src/basic/sort-util.h | 23 | +++ b/src/basic/sort-util.h |
| 26 | @@ -55,18 +55,4 @@ static inline void _qsort_safe(void *base, size_t nmemb, size_t size, __compar_f | 24 | @@ -61,18 +61,4 @@ static inline void _qsort_safe(void *bas |
| 27 | _qsort_safe((p), (n), sizeof((p)[0]), (__compar_fn_t) _func_); \ | 25 | _qsort_safe((p), (n), sizeof((p)[0]), (comparison_fn_t) _func_); \ |
| 28 | }) | 26 | }) |
| 29 | 27 | ||
| 30 | -static inline void qsort_r_safe(void *base, size_t nmemb, size_t size, __compar_d_fn_t compar, void *userdata) { | 28 | -static inline void qsort_r_safe(void *base, size_t nmemb, size_t size, comparison_userdata_fn_t compar, void *userdata) { |
| 31 | - if (nmemb <= 1) | 29 | - if (nmemb <= 1) |
| 32 | - return; | 30 | - return; |
| 33 | - | 31 | - |
| @@ -38,15 +36,13 @@ index 49586a4a24..d92a5ab0ed 100644 | |||
| 38 | -#define typesafe_qsort_r(p, n, func, userdata) \ | 36 | -#define typesafe_qsort_r(p, n, func, userdata) \ |
| 39 | - ({ \ | 37 | - ({ \ |
| 40 | - int (*_func_)(const typeof(p[0])*, const typeof(p[0])*, typeof(userdata)) = func; \ | 38 | - int (*_func_)(const typeof(p[0])*, const typeof(p[0])*, typeof(userdata)) = func; \ |
| 41 | - qsort_r_safe((p), (n), sizeof((p)[0]), (__compar_d_fn_t) _func_, userdata); \ | 39 | - qsort_r_safe((p), (n), sizeof((p)[0]), (comparison_userdata_fn_t) _func_, userdata); \ |
| 42 | - }) | 40 | - }) |
| 43 | - | 41 | - |
| 44 | int cmp_int(const int *a, const int *b); | 42 | int cmp_int(const int *a, const int *b); |
| 45 | diff --git a/src/shared/format-table.c b/src/shared/format-table.c | ||
| 46 | index 4c4e4593d8..17b329f315 100644 | ||
| 47 | --- a/src/shared/format-table.c | 43 | --- a/src/shared/format-table.c |
| 48 | +++ b/src/shared/format-table.c | 44 | +++ b/src/shared/format-table.c |
| 49 | @@ -1282,30 +1282,32 @@ static int cell_data_compare(TableData *a, size_t index_a, TableData *b, size_t | 45 | @@ -1324,30 +1324,32 @@ static int cell_data_compare(TableData * |
| 50 | return CMP(index_a, index_b); | 46 | return CMP(index_a, index_b); |
| 51 | } | 47 | } |
| 52 | 48 | ||
| @@ -89,7 +85,7 @@ index 4c4e4593d8..17b329f315 100644 | |||
| 89 | } | 85 | } |
| 90 | 86 | ||
| 91 | /* Order identical lines by the order there were originally added in */ | 87 | /* Order identical lines by the order there were originally added in */ |
| 92 | @@ -1944,7 +1946,12 @@ int table_print(Table *t, FILE *f) { | 88 | @@ -2009,7 +2011,12 @@ int table_print(Table *t, FILE *f) { |
| 93 | for (size_t i = 0; i < n_rows; i++) | 89 | for (size_t i = 0; i < n_rows; i++) |
| 94 | sorted[i] = i * t->n_columns; | 90 | sorted[i] = i * t->n_columns; |
| 95 | 91 | ||
| @@ -103,7 +99,7 @@ index 4c4e4593d8..17b329f315 100644 | |||
| 103 | } | 99 | } |
| 104 | 100 | ||
| 105 | if (t->display_map) | 101 | if (t->display_map) |
| 106 | @@ -2572,7 +2579,12 @@ int table_to_json(Table *t, JsonVariant **ret) { | 102 | @@ -2647,7 +2654,12 @@ int table_to_json(Table *t, JsonVariant |
| 107 | for (size_t i = 0; i < n_rows; i++) | 103 | for (size_t i = 0; i < n_rows; i++) |
| 108 | sorted[i] = i * t->n_columns; | 104 | sorted[i] = i * t->n_columns; |
| 109 | 105 | ||
| @@ -117,11 +113,9 @@ index 4c4e4593d8..17b329f315 100644 | |||
| 117 | } | 113 | } |
| 118 | 114 | ||
| 119 | if (t->display_map) | 115 | if (t->display_map) |
| 120 | diff --git a/src/shared/hwdb-util.c b/src/shared/hwdb-util.c | ||
| 121 | index d7626aed95..2003fac7c3 100644 | ||
| 122 | --- a/src/shared/hwdb-util.c | 116 | --- a/src/shared/hwdb-util.c |
| 123 | +++ b/src/shared/hwdb-util.c | 117 | +++ b/src/shared/hwdb-util.c |
| 124 | @@ -127,9 +127,13 @@ static struct trie* trie_free(struct trie *trie) { | 118 | @@ -127,9 +127,13 @@ static struct trie* trie_free(struct tri |
| 125 | 119 | ||
| 126 | DEFINE_TRIVIAL_CLEANUP_FUNC(struct trie*, trie_free); | 120 | DEFINE_TRIVIAL_CLEANUP_FUNC(struct trie*, trie_free); |
| 127 | 121 | ||
| @@ -138,7 +132,7 @@ index d7626aed95..2003fac7c3 100644 | |||
| 138 | } | 132 | } |
| 139 | 133 | ||
| 140 | static int trie_node_add_value(struct trie *trie, struct trie_node *node, | 134 | static int trie_node_add_value(struct trie *trie, struct trie_node *node, |
| 141 | @@ -157,7 +161,10 @@ 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 |
| 142 | .value_off = v, | 136 | .value_off = v, |
| 143 | }; | 137 | }; |
| 144 | 138 | ||
| @@ -150,7 +144,7 @@ index d7626aed95..2003fac7c3 100644 | |||
| 150 | if (val) { | 144 | if (val) { |
| 151 | /* At this point we have 2 identical properties on the same match-string. | 145 | /* At this point we have 2 identical properties on the same match-string. |
| 152 | * Since we process files in order, we just replace the previous value. */ | 146 | * Since we process files in order, we just replace the previous value. */ |
| 153 | @@ -183,7 +190,9 @@ static int trie_node_add_value(struct trie *trie, struct trie_node *node, | 147 | @@ -183,7 +190,9 @@ static int trie_node_add_value(struct tr |
| 154 | .line_number = line_number, | 148 | .line_number = line_number, |
| 155 | }; | 149 | }; |
| 156 | node->values_count++; | 150 | node->values_count++; |
diff --git a/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch b/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch index eca52d0bda..f3edc7d82b 100644 --- a/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch +++ b/meta/recipes-core/systemd/systemd/0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch | |||
| @@ -21,8 +21,6 @@ Signed-off-by: Andrej Valek <andrej.valek@siemens.com> | |||
| 21 | src/libsystemd/sd-journal/catalog.c | 1 + | 21 | src/libsystemd/sd-journal/catalog.c | 1 + |
| 22 | 4 files changed, 12 insertions(+) | 22 | 4 files changed, 12 insertions(+) |
| 23 | 23 | ||
| 24 | diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h | ||
| 25 | index f6233090a9..aeaf6ad5ec 100644 | ||
| 26 | --- a/src/basic/missing_type.h | 24 | --- a/src/basic/missing_type.h |
| 27 | +++ b/src/basic/missing_type.h | 25 | +++ b/src/basic/missing_type.h |
| 28 | @@ -10,3 +10,12 @@ | 26 | @@ -10,3 +10,12 @@ |
| @@ -38,8 +36,6 @@ index f6233090a9..aeaf6ad5ec 100644 | |||
| 38 | +#define __COMPAR_FN_T | 36 | +#define __COMPAR_FN_T |
| 39 | +typedef int (*__compar_fn_t)(const void *, const void *); | 37 | +typedef int (*__compar_fn_t)(const void *, const void *); |
| 40 | +#endif | 38 | +#endif |
| 41 | diff --git a/src/basic/sort-util.h b/src/basic/sort-util.h | ||
| 42 | index d92a5ab0ed..a63867c716 100644 | ||
| 43 | --- a/src/basic/sort-util.h | 39 | --- a/src/basic/sort-util.h |
| 44 | +++ b/src/basic/sort-util.h | 40 | +++ b/src/basic/sort-util.h |
| 45 | @@ -4,6 +4,7 @@ | 41 | @@ -4,6 +4,7 @@ |
| @@ -48,22 +44,18 @@ index d92a5ab0ed..a63867c716 100644 | |||
| 48 | #include "macro.h" | 44 | #include "macro.h" |
| 49 | +#include "missing_type.h" | 45 | +#include "missing_type.h" |
| 50 | 46 | ||
| 51 | void *xbsearch_r(const void *key, const void *base, size_t nmemb, size_t size, | 47 | /* This is the same as glibc's internal __compar_d_fn_t type. glibc exports a public comparison_fn_t, for the |
| 52 | __compar_d_fn_t compar, void *arg); | 48 | * external type __compar_fn_t, but doesn't do anything similar for __compar_d_fn_t. Let's hence do that |
| 53 | diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c | ||
| 54 | index 8a7f82812a..a56f12f47f 100644 | ||
| 55 | --- a/src/core/kmod-setup.c | 49 | --- a/src/core/kmod-setup.c |
| 56 | +++ b/src/core/kmod-setup.c | 50 | +++ b/src/core/kmod-setup.c |
| 57 | @@ -10,6 +10,7 @@ | 51 | @@ -10,6 +10,7 @@ |
| 58 | #include "kmod-setup.h" | ||
| 59 | #include "macro.h" | 52 | #include "macro.h" |
| 53 | #include "recurse-dir.h" | ||
| 60 | #include "string-util.h" | 54 | #include "string-util.h" |
| 61 | +#include "missing_type.h" | 55 | +#include "missing_type.h" |
| 62 | 56 | ||
| 63 | #if HAVE_KMOD | 57 | #if HAVE_KMOD |
| 64 | #include "module-util.h" | 58 | #include "module-util.h" |
| 65 | diff --git a/src/libsystemd/sd-journal/catalog.c b/src/libsystemd/sd-journal/catalog.c | ||
| 66 | index ce8d47ccc3..00845f9776 100644 | ||
| 67 | --- a/src/libsystemd/sd-journal/catalog.c | 59 | --- a/src/libsystemd/sd-journal/catalog.c |
| 68 | +++ b/src/libsystemd/sd-journal/catalog.c | 60 | +++ b/src/libsystemd/sd-journal/catalog.c |
| 69 | @@ -28,6 +28,7 @@ | 61 | @@ -28,6 +28,7 @@ |
diff --git a/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch b/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch index 40ee43b155..d93f630752 100644 --- a/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch +++ b/meta/recipes-core/systemd/systemd/0004-add-fallback-parse_printf_format-implementation.patch | |||
| @@ -22,11 +22,9 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
| 22 | create mode 100644 src/basic/parse-printf-format.c | 22 | create mode 100644 src/basic/parse-printf-format.c |
| 23 | create mode 100644 src/basic/parse-printf-format.h | 23 | create mode 100644 src/basic/parse-printf-format.h |
| 24 | 24 | ||
| 25 | diff --git a/meson.build b/meson.build | ||
| 26 | index 5bdfd9753d..3421da3a4d 100644 | ||
| 27 | --- a/meson.build | 25 | --- a/meson.build |
| 28 | +++ b/meson.build | 26 | +++ b/meson.build |
| 29 | @@ -656,6 +656,7 @@ endif | 27 | @@ -686,6 +686,7 @@ endif |
| 30 | foreach header : ['crypt.h', | 28 | foreach header : ['crypt.h', |
| 31 | 'linux/memfd.h', | 29 | 'linux/memfd.h', |
| 32 | 'linux/vm_sockets.h', | 30 | 'linux/vm_sockets.h', |
| @@ -34,11 +32,9 @@ index 5bdfd9753d..3421da3a4d 100644 | |||
| 34 | 'sys/auxv.h', | 32 | 'sys/auxv.h', |
| 35 | 'valgrind/memcheck.h', | 33 | 'valgrind/memcheck.h', |
| 36 | 'valgrind/valgrind.h', | 34 | 'valgrind/valgrind.h', |
| 37 | diff --git a/src/basic/meson.build b/src/basic/meson.build | ||
| 38 | index 452b965db3..4e64d883dc 100644 | ||
| 39 | --- a/src/basic/meson.build | 35 | --- a/src/basic/meson.build |
| 40 | +++ b/src/basic/meson.build | 36 | +++ b/src/basic/meson.build |
| 41 | @@ -321,6 +321,11 @@ endforeach | 37 | @@ -335,6 +335,11 @@ endforeach |
| 42 | 38 | ||
| 43 | basic_sources += generated_gperf_headers | 39 | basic_sources += generated_gperf_headers |
| 44 | 40 | ||
| @@ -50,9 +46,6 @@ index 452b965db3..4e64d883dc 100644 | |||
| 50 | ############################################################ | 46 | ############################################################ |
| 51 | 47 | ||
| 52 | arch_list = [ | 48 | arch_list = [ |
| 53 | diff --git a/src/basic/parse-printf-format.c b/src/basic/parse-printf-format.c | ||
| 54 | new file mode 100644 | ||
| 55 | index 0000000000..49437e5445 | ||
| 56 | --- /dev/null | 49 | --- /dev/null |
| 57 | +++ b/src/basic/parse-printf-format.c | 50 | +++ b/src/basic/parse-printf-format.c |
| 58 | @@ -0,0 +1,273 @@ | 51 | @@ -0,0 +1,273 @@ |
| @@ -329,9 +322,6 @@ index 0000000000..49437e5445 | |||
| 329 | + | 322 | + |
| 330 | + return last; | 323 | + return last; |
| 331 | +} | 324 | +} |
| 332 | diff --git a/src/basic/parse-printf-format.h b/src/basic/parse-printf-format.h | ||
| 333 | new file mode 100644 | ||
| 334 | index 0000000000..47be7522d7 | ||
| 335 | --- /dev/null | 325 | --- /dev/null |
| 336 | +++ b/src/basic/parse-printf-format.h | 326 | +++ b/src/basic/parse-printf-format.h |
| 337 | @@ -0,0 +1,57 @@ | 327 | @@ -0,0 +1,57 @@ |
| @@ -392,8 +382,6 @@ index 0000000000..47be7522d7 | |||
| 392 | +size_t parse_printf_format(const char *fmt, size_t n, int *types); | 382 | +size_t parse_printf_format(const char *fmt, size_t n, int *types); |
| 393 | + | 383 | + |
| 394 | +#endif /* HAVE_PRINTF_H */ | 384 | +#endif /* HAVE_PRINTF_H */ |
| 395 | diff --git a/src/basic/stdio-util.h b/src/basic/stdio-util.h | ||
| 396 | index 6dc1e72312..cea76b36cf 100644 | ||
| 397 | --- a/src/basic/stdio-util.h | 385 | --- a/src/basic/stdio-util.h |
| 398 | +++ b/src/basic/stdio-util.h | 386 | +++ b/src/basic/stdio-util.h |
| 399 | @@ -1,13 +1,13 @@ | 387 | @@ -1,13 +1,13 @@ |
| @@ -409,10 +397,8 @@ index 6dc1e72312..cea76b36cf 100644 | |||
| 409 | #include "memory-util.h" | 397 | #include "memory-util.h" |
| 410 | +#include "parse-printf-format.h" | 398 | +#include "parse-printf-format.h" |
| 411 | 399 | ||
| 412 | #define snprintf_ok(buf, len, fmt, ...) \ | 400 | #define snprintf_ok(buf, len, fmt, ...) \ |
| 413 | ((size_t) snprintf(buf, len, fmt, __VA_ARGS__) < (len)) | 401 | ({ \ |
| 414 | diff --git a/src/libsystemd/sd-journal/journal-send.c b/src/libsystemd/sd-journal/journal-send.c | ||
| 415 | index fd3fd7ef9c..e8e6ad555b 100644 | ||
| 416 | --- a/src/libsystemd/sd-journal/journal-send.c | 402 | --- a/src/libsystemd/sd-journal/journal-send.c |
| 417 | +++ b/src/libsystemd/sd-journal/journal-send.c | 403 | +++ b/src/libsystemd/sd-journal/journal-send.c |
| 418 | @@ -2,7 +2,6 @@ | 404 | @@ -2,7 +2,6 @@ |
diff --git a/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch b/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch index efdd43708b..36545c2f60 100644 --- a/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch +++ b/meta/recipes-core/systemd/systemd/0005-src-basic-missing.h-check-for-missing-strndupa.patch | |||
| @@ -72,11 +72,9 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
| 72 | src/udev/udev-rules.c | 1 + | 72 | src/udev/udev-rules.c | 1 + |
| 73 | 51 files changed, 62 insertions(+) | 73 | 51 files changed, 62 insertions(+) |
| 74 | 74 | ||
| 75 | diff --git a/meson.build b/meson.build | ||
| 76 | index 3421da3a4d..ddef6fba91 100644 | ||
| 77 | --- a/meson.build | 75 | --- a/meson.build |
| 78 | +++ b/meson.build | 76 | +++ b/meson.build |
| 79 | @@ -480,6 +480,7 @@ foreach ident : ['secure_getenv', '__secure_getenv'] | 77 | @@ -507,6 +507,7 @@ foreach ident : ['secure_getenv', '__sec |
| 80 | endforeach | 78 | endforeach |
| 81 | 79 | ||
| 82 | foreach ident : [ | 80 | foreach ident : [ |
| @@ -84,8 +82,6 @@ index 3421da3a4d..ddef6fba91 100644 | |||
| 84 | ['memfd_create', '''#include <sys/mman.h>'''], | 82 | ['memfd_create', '''#include <sys/mman.h>'''], |
| 85 | ['gettid', '''#include <sys/types.h> | 83 | ['gettid', '''#include <sys/types.h> |
| 86 | #include <unistd.h>'''], | 84 | #include <unistd.h>'''], |
| 87 | diff --git a/src/backlight/backlight.c b/src/backlight/backlight.c | ||
| 88 | index 7c0970a60c..c129ff0f4f 100644 | ||
| 89 | --- a/src/backlight/backlight.c | 85 | --- a/src/backlight/backlight.c |
| 90 | +++ b/src/backlight/backlight.c | 86 | +++ b/src/backlight/backlight.c |
| 91 | @@ -19,6 +19,7 @@ | 87 | @@ -19,6 +19,7 @@ |
| @@ -96,11 +92,9 @@ index 7c0970a60c..c129ff0f4f 100644 | |||
| 96 | 92 | ||
| 97 | static int help(void) { | 93 | static int help(void) { |
| 98 | _cleanup_free_ char *link = NULL; | 94 | _cleanup_free_ char *link = NULL; |
| 99 | diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c | ||
| 100 | index 1ff6160dc8..c9efd862a2 100644 | ||
| 101 | --- a/src/basic/cgroup-util.c | 95 | --- a/src/basic/cgroup-util.c |
| 102 | +++ b/src/basic/cgroup-util.c | 96 | +++ b/src/basic/cgroup-util.c |
| 103 | @@ -38,6 +38,7 @@ | 97 | @@ -37,6 +37,7 @@ |
| 104 | #include "unit-name.h" | 98 | #include "unit-name.h" |
| 105 | #include "user-util.h" | 99 | #include "user-util.h" |
| 106 | #include "xattr-util.h" | 100 | #include "xattr-util.h" |
| @@ -108,11 +102,9 @@ index 1ff6160dc8..c9efd862a2 100644 | |||
| 108 | 102 | ||
| 109 | static int cg_enumerate_items(const char *controller, const char *path, FILE **_f, const char *item) { | 103 | static int cg_enumerate_items(const char *controller, const char *path, FILE **_f, const char *item) { |
| 110 | _cleanup_free_ char *fs = NULL; | 104 | _cleanup_free_ char *fs = NULL; |
| 111 | diff --git a/src/basic/env-util.c b/src/basic/env-util.c | ||
| 112 | index 1ca445dab4..1f5a212d4e 100644 | ||
| 113 | --- a/src/basic/env-util.c | 105 | --- a/src/basic/env-util.c |
| 114 | +++ b/src/basic/env-util.c | 106 | +++ b/src/basic/env-util.c |
| 115 | @@ -18,6 +18,7 @@ | 107 | @@ -19,6 +19,7 @@ |
| 116 | #include "string-util.h" | 108 | #include "string-util.h" |
| 117 | #include "strv.h" | 109 | #include "strv.h" |
| 118 | #include "utf8.h" | 110 | #include "utf8.h" |
| @@ -120,8 +112,6 @@ index 1ca445dab4..1f5a212d4e 100644 | |||
| 120 | 112 | ||
| 121 | /* We follow bash for the character set. Different shells have different rules. */ | 113 | /* We follow bash for the character set. Different shells have different rules. */ |
| 122 | #define VALID_BASH_ENV_NAME_CHARS \ | 114 | #define VALID_BASH_ENV_NAME_CHARS \ |
| 123 | diff --git a/src/basic/log.c b/src/basic/log.c | ||
| 124 | index fb183ea9e7..82e7bdff60 100644 | ||
| 125 | --- a/src/basic/log.c | 115 | --- a/src/basic/log.c |
| 126 | +++ b/src/basic/log.c | 116 | +++ b/src/basic/log.c |
| 127 | @@ -36,6 +36,7 @@ | 117 | @@ -36,6 +36,7 @@ |
| @@ -132,8 +122,6 @@ index fb183ea9e7..82e7bdff60 100644 | |||
| 132 | 122 | ||
| 133 | #define SNDBUF_SIZE (8*1024*1024) | 123 | #define SNDBUF_SIZE (8*1024*1024) |
| 134 | 124 | ||
| 135 | diff --git a/src/basic/missing_stdlib.h b/src/basic/missing_stdlib.h | ||
| 136 | index 8c76f93eb2..9068bfb4f0 100644 | ||
| 137 | --- a/src/basic/missing_stdlib.h | 125 | --- a/src/basic/missing_stdlib.h |
| 138 | +++ b/src/basic/missing_stdlib.h | 126 | +++ b/src/basic/missing_stdlib.h |
| 139 | @@ -11,3 +11,15 @@ | 127 | @@ -11,3 +11,15 @@ |
| @@ -152,11 +140,9 @@ index 8c76f93eb2..9068bfb4f0 100644 | |||
| 152 | + (char *)memcpy(__new, __old, __len); \ | 140 | + (char *)memcpy(__new, __old, __len); \ |
| 153 | + }) | 141 | + }) |
| 154 | +#endif | 142 | +#endif |
| 155 | diff --git a/src/basic/mkdir.c b/src/basic/mkdir.c | ||
| 156 | index f91f8f7a08..fb31596216 100644 | ||
| 157 | --- a/src/basic/mkdir.c | 143 | --- a/src/basic/mkdir.c |
| 158 | +++ b/src/basic/mkdir.c | 144 | +++ b/src/basic/mkdir.c |
| 159 | @@ -14,6 +14,7 @@ | 145 | @@ -15,6 +15,7 @@ |
| 160 | #include "stat-util.h" | 146 | #include "stat-util.h" |
| 161 | #include "stdio-util.h" | 147 | #include "stdio-util.h" |
| 162 | #include "user-util.h" | 148 | #include "user-util.h" |
| @@ -164,23 +150,19 @@ index f91f8f7a08..fb31596216 100644 | |||
| 164 | 150 | ||
| 165 | int mkdir_safe_internal( | 151 | int mkdir_safe_internal( |
| 166 | const char *path, | 152 | const char *path, |
| 167 | diff --git a/src/basic/mountpoint-util.c b/src/basic/mountpoint-util.c | ||
| 168 | index 7e57d9a226..c0e64f2aca 100644 | ||
| 169 | --- a/src/basic/mountpoint-util.c | 153 | --- a/src/basic/mountpoint-util.c |
| 170 | +++ b/src/basic/mountpoint-util.c | 154 | +++ b/src/basic/mountpoint-util.c |
| 171 | @@ -11,6 +11,7 @@ | 155 | @@ -13,6 +13,7 @@ |
| 172 | #include "missing_stat.h" | 156 | #include "missing_stat.h" |
| 173 | #include "missing_syscall.h" | 157 | #include "missing_syscall.h" |
| 174 | #include "mkdir.h" | 158 | #include "mkdir.h" |
| 175 | +#include "missing_stdlib.h" | 159 | +#include "missing_stdlib.h" |
| 176 | #include "mountpoint-util.h" | 160 | #include "mountpoint-util.h" |
| 161 | #include "nulstr-util.h" | ||
| 177 | #include "parse-util.h" | 162 | #include "parse-util.h" |
| 178 | #include "path-util.h" | ||
| 179 | diff --git a/src/basic/parse-util.c b/src/basic/parse-util.c | ||
| 180 | index b79c885dfd..6dabda5691 100644 | ||
| 181 | --- a/src/basic/parse-util.c | 163 | --- a/src/basic/parse-util.c |
| 182 | +++ b/src/basic/parse-util.c | 164 | +++ b/src/basic/parse-util.c |
| 183 | @@ -19,6 +19,7 @@ | 165 | @@ -18,6 +18,7 @@ |
| 184 | #include "stat-util.h" | 166 | #include "stat-util.h" |
| 185 | #include "string-util.h" | 167 | #include "string-util.h" |
| 186 | #include "strv.h" | 168 | #include "strv.h" |
| @@ -188,11 +170,9 @@ index b79c885dfd..6dabda5691 100644 | |||
| 188 | 170 | ||
| 189 | int parse_boolean(const char *v) { | 171 | int parse_boolean(const char *v) { |
| 190 | if (!v) | 172 | if (!v) |
| 191 | diff --git a/src/basic/path-lookup.c b/src/basic/path-lookup.c | ||
| 192 | index 05eb17d66c..b6026aab28 100644 | ||
| 193 | --- a/src/basic/path-lookup.c | 173 | --- a/src/basic/path-lookup.c |
| 194 | +++ b/src/basic/path-lookup.c | 174 | +++ b/src/basic/path-lookup.c |
| 195 | @@ -15,6 +15,7 @@ | 175 | @@ -16,6 +16,7 @@ |
| 196 | #include "strv.h" | 176 | #include "strv.h" |
| 197 | #include "tmpfile-util.h" | 177 | #include "tmpfile-util.h" |
| 198 | #include "user-util.h" | 178 | #include "user-util.h" |
| @@ -200,8 +180,6 @@ index 05eb17d66c..b6026aab28 100644 | |||
| 200 | 180 | ||
| 201 | int xdg_user_runtime_dir(char **ret, const char *suffix) { | 181 | int xdg_user_runtime_dir(char **ret, const char *suffix) { |
| 202 | const char *e; | 182 | const char *e; |
| 203 | diff --git a/src/basic/percent-util.c b/src/basic/percent-util.c | ||
| 204 | index 06f20fd61e..8159d721bb 100644 | ||
| 205 | --- a/src/basic/percent-util.c | 183 | --- a/src/basic/percent-util.c |
| 206 | +++ b/src/basic/percent-util.c | 184 | +++ b/src/basic/percent-util.c |
| 207 | @@ -3,6 +3,7 @@ | 185 | @@ -3,6 +3,7 @@ |
| @@ -212,8 +190,6 @@ index 06f20fd61e..8159d721bb 100644 | |||
| 212 | 190 | ||
| 213 | static int parse_parts_value_whole(const char *p, const char *symbol) { | 191 | static int parse_parts_value_whole(const char *p, const char *symbol) { |
| 214 | const char *pc, *n; | 192 | const char *pc, *n; |
| 215 | diff --git a/src/basic/proc-cmdline.c b/src/basic/proc-cmdline.c | ||
| 216 | index 410b8a3eb5..f2c4355609 100644 | ||
| 217 | --- a/src/basic/proc-cmdline.c | 193 | --- a/src/basic/proc-cmdline.c |
| 218 | +++ b/src/basic/proc-cmdline.c | 194 | +++ b/src/basic/proc-cmdline.c |
| 219 | @@ -15,6 +15,7 @@ | 195 | @@ -15,6 +15,7 @@ |
| @@ -224,20 +200,16 @@ index 410b8a3eb5..f2c4355609 100644 | |||
| 224 | 200 | ||
| 225 | int proc_cmdline(char **ret) { | 201 | int proc_cmdline(char **ret) { |
| 226 | const char *e; | 202 | const char *e; |
| 227 | diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c | ||
| 228 | index 9234ccaf85..8c57094225 100644 | ||
| 229 | --- a/src/basic/procfs-util.c | 203 | --- a/src/basic/procfs-util.c |
| 230 | +++ b/src/basic/procfs-util.c | 204 | +++ b/src/basic/procfs-util.c |
| 231 | @@ -11,6 +11,7 @@ | 205 | @@ -12,6 +12,7 @@ |
| 232 | #include "procfs-util.h" | 206 | #include "procfs-util.h" |
| 233 | #include "stdio-util.h" | 207 | #include "stdio-util.h" |
| 234 | #include "string-util.h" | 208 | #include "string-util.h" |
| 235 | +#include "missing_stdlib.h" | 209 | +#include "missing_stdlib.h" |
| 236 | 210 | ||
| 237 | int procfs_tasks_get_limit(uint64_t *ret) { | 211 | int procfs_get_pid_max(uint64_t *ret) { |
| 238 | _cleanup_free_ char *value = NULL; | 212 | _cleanup_free_ char *value = NULL; |
| 239 | diff --git a/src/basic/time-util.c b/src/basic/time-util.c | ||
| 240 | index 5d162e8ffe..1cde8e4262 100644 | ||
| 241 | --- a/src/basic/time-util.c | 213 | --- a/src/basic/time-util.c |
| 242 | +++ b/src/basic/time-util.c | 214 | +++ b/src/basic/time-util.c |
| 243 | @@ -26,6 +26,7 @@ | 215 | @@ -26,6 +26,7 @@ |
| @@ -248,11 +220,9 @@ index 5d162e8ffe..1cde8e4262 100644 | |||
| 248 | 220 | ||
| 249 | static clockid_t map_clock_id(clockid_t c) { | 221 | static clockid_t map_clock_id(clockid_t c) { |
| 250 | 222 | ||
| 251 | diff --git a/src/boot/bless-boot.c b/src/boot/bless-boot.c | ||
| 252 | index 3fc319ca27..90064c90f3 100644 | ||
| 253 | --- a/src/boot/bless-boot.c | 223 | --- a/src/boot/bless-boot.c |
| 254 | +++ b/src/boot/bless-boot.c | 224 | +++ b/src/boot/bless-boot.c |
| 255 | @@ -18,6 +18,7 @@ | 225 | @@ -19,6 +19,7 @@ |
| 256 | #include "util.h" | 226 | #include "util.h" |
| 257 | #include "verbs.h" | 227 | #include "verbs.h" |
| 258 | #include "virt.h" | 228 | #include "virt.h" |
| @@ -260,23 +230,9 @@ index 3fc319ca27..90064c90f3 100644 | |||
| 260 | 230 | ||
| 261 | static char **arg_path = NULL; | 231 | static char **arg_path = NULL; |
| 262 | 232 | ||
| 263 | diff --git a/src/core/dbus-cgroup.c b/src/core/dbus-cgroup.c | ||
| 264 | index 84c3caf3a5..0fa84eaa38 100644 | ||
| 265 | --- a/src/core/dbus-cgroup.c | ||
| 266 | +++ b/src/core/dbus-cgroup.c | ||
| 267 | @@ -20,6 +20,7 @@ | ||
| 268 | #include "parse-util.h" | ||
| 269 | #include "path-util.h" | ||
| 270 | #include "percent-util.h" | ||
| 271 | +#include "missing_stdlib.h" | ||
| 272 | |||
| 273 | BUS_DEFINE_PROPERTY_GET(bus_property_get_tasks_max, "t", TasksMax, tasks_max_resolve); | ||
| 274 | |||
| 275 | diff --git a/src/core/dbus-execute.c b/src/core/dbus-execute.c | ||
| 276 | index 902e074bd2..ac15b944e6 100644 | ||
| 277 | --- a/src/core/dbus-execute.c | 233 | --- a/src/core/dbus-execute.c |
| 278 | +++ b/src/core/dbus-execute.c | 234 | +++ b/src/core/dbus-execute.c |
| 279 | @@ -42,6 +42,7 @@ | 235 | @@ -44,6 +44,7 @@ |
| 280 | #include "unit-printf.h" | 236 | #include "unit-printf.h" |
| 281 | #include "user-util.h" | 237 | #include "user-util.h" |
| 282 | #include "utf8.h" | 238 | #include "utf8.h" |
| @@ -284,8 +240,6 @@ index 902e074bd2..ac15b944e6 100644 | |||
| 284 | 240 | ||
| 285 | BUS_DEFINE_PROPERTY_GET_ENUM(bus_property_get_exec_output, exec_output, ExecOutput); | 241 | BUS_DEFINE_PROPERTY_GET_ENUM(bus_property_get_exec_output, exec_output, ExecOutput); |
| 286 | static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_exec_input, exec_input, ExecInput); | 242 | static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_exec_input, exec_input, ExecInput); |
| 287 | diff --git a/src/core/dbus-util.c b/src/core/dbus-util.c | ||
| 288 | index ca9b399d8c..b864480a8c 100644 | ||
| 289 | --- a/src/core/dbus-util.c | 243 | --- a/src/core/dbus-util.c |
| 290 | +++ b/src/core/dbus-util.c | 244 | +++ b/src/core/dbus-util.c |
| 291 | @@ -9,6 +9,7 @@ | 245 | @@ -9,6 +9,7 @@ |
| @@ -296,11 +250,9 @@ index ca9b399d8c..b864480a8c 100644 | |||
| 296 | 250 | ||
| 297 | int bus_property_get_triggered_unit( | 251 | int bus_property_get_triggered_unit( |
| 298 | sd_bus *bus, | 252 | sd_bus *bus, |
| 299 | diff --git a/src/core/execute.c b/src/core/execute.c | ||
| 300 | index 2f2de4d9cf..515b2fe748 100644 | ||
| 301 | --- a/src/core/execute.c | 253 | --- a/src/core/execute.c |
| 302 | +++ b/src/core/execute.c | 254 | +++ b/src/core/execute.c |
| 303 | @@ -98,6 +98,7 @@ | 255 | @@ -102,6 +102,7 @@ |
| 304 | #include "unit-serialize.h" | 256 | #include "unit-serialize.h" |
| 305 | #include "user-util.h" | 257 | #include "user-util.h" |
| 306 | #include "utmp-wtmp.h" | 258 | #include "utmp-wtmp.h" |
| @@ -308,23 +260,19 @@ index 2f2de4d9cf..515b2fe748 100644 | |||
| 308 | 260 | ||
| 309 | #define IDLE_TIMEOUT_USEC (5*USEC_PER_SEC) | 261 | #define IDLE_TIMEOUT_USEC (5*USEC_PER_SEC) |
| 310 | #define IDLE_TIMEOUT2_USEC (1*USEC_PER_SEC) | 262 | #define IDLE_TIMEOUT2_USEC (1*USEC_PER_SEC) |
| 311 | diff --git a/src/core/kmod-setup.c b/src/core/kmod-setup.c | ||
| 312 | index a56f12f47f..6b8729ef67 100644 | ||
| 313 | --- a/src/core/kmod-setup.c | 263 | --- a/src/core/kmod-setup.c |
| 314 | +++ b/src/core/kmod-setup.c | 264 | +++ b/src/core/kmod-setup.c |
| 315 | @@ -11,6 +11,7 @@ | 265 | @@ -11,6 +11,7 @@ |
| 316 | #include "macro.h" | 266 | #include "recurse-dir.h" |
| 317 | #include "string-util.h" | 267 | #include "string-util.h" |
| 318 | #include "missing_type.h" | 268 | #include "missing_type.h" |
| 319 | +#include "missing_stdlib.h" | 269 | +#include "missing_stdlib.h" |
| 320 | 270 | ||
| 321 | #if HAVE_KMOD | 271 | #if HAVE_KMOD |
| 322 | #include "module-util.h" | 272 | #include "module-util.h" |
| 323 | diff --git a/src/core/service.c b/src/core/service.c | ||
| 324 | index 7b90822f68..4af076eeba 100644 | ||
| 325 | --- a/src/core/service.c | 273 | --- a/src/core/service.c |
| 326 | +++ b/src/core/service.c | 274 | +++ b/src/core/service.c |
| 327 | @@ -41,6 +41,7 @@ | 275 | @@ -42,6 +42,7 @@ |
| 328 | #include "unit.h" | 276 | #include "unit.h" |
| 329 | #include "utf8.h" | 277 | #include "utf8.h" |
| 330 | #include "util.h" | 278 | #include "util.h" |
| @@ -332,8 +280,6 @@ index 7b90822f68..4af076eeba 100644 | |||
| 332 | 280 | ||
| 333 | static const UnitActiveState state_translation_table[_SERVICE_STATE_MAX] = { | 281 | static const UnitActiveState state_translation_table[_SERVICE_STATE_MAX] = { |
| 334 | [SERVICE_DEAD] = UNIT_INACTIVE, | 282 | [SERVICE_DEAD] = UNIT_INACTIVE, |
| 335 | diff --git a/src/coredump/coredump-vacuum.c b/src/coredump/coredump-vacuum.c | ||
| 336 | index 95c3fca661..d4a9f27b08 100644 | ||
| 337 | --- a/src/coredump/coredump-vacuum.c | 283 | --- a/src/coredump/coredump-vacuum.c |
| 338 | +++ b/src/coredump/coredump-vacuum.c | 284 | +++ b/src/coredump/coredump-vacuum.c |
| 339 | @@ -16,6 +16,7 @@ | 285 | @@ -16,6 +16,7 @@ |
| @@ -344,8 +290,6 @@ index 95c3fca661..d4a9f27b08 100644 | |||
| 344 | 290 | ||
| 345 | #define DEFAULT_MAX_USE_LOWER (uint64_t) (1ULL*1024ULL*1024ULL) /* 1 MiB */ | 291 | #define DEFAULT_MAX_USE_LOWER (uint64_t) (1ULL*1024ULL*1024ULL) /* 1 MiB */ |
| 346 | #define DEFAULT_MAX_USE_UPPER (uint64_t) (4ULL*1024ULL*1024ULL*1024ULL) /* 4 GiB */ | 292 | #define DEFAULT_MAX_USE_UPPER (uint64_t) (4ULL*1024ULL*1024ULL*1024ULL) /* 4 GiB */ |
| 347 | diff --git a/src/journal-remote/journal-remote-main.c b/src/journal-remote/journal-remote-main.c | ||
| 348 | index ae1d43756a..24de98c9f3 100644 | ||
| 349 | --- a/src/journal-remote/journal-remote-main.c | 293 | --- a/src/journal-remote/journal-remote-main.c |
| 350 | +++ b/src/journal-remote/journal-remote-main.c | 294 | +++ b/src/journal-remote/journal-remote-main.c |
| 351 | @@ -24,6 +24,7 @@ | 295 | @@ -24,6 +24,7 @@ |
| @@ -356,11 +300,9 @@ index ae1d43756a..24de98c9f3 100644 | |||
| 356 | 300 | ||
| 357 | #define PRIV_KEY_FILE CERTIFICATE_ROOT "/private/journal-remote.pem" | 301 | #define PRIV_KEY_FILE CERTIFICATE_ROOT "/private/journal-remote.pem" |
| 358 | #define CERT_FILE CERTIFICATE_ROOT "/certs/journal-remote.pem" | 302 | #define CERT_FILE CERTIFICATE_ROOT "/certs/journal-remote.pem" |
| 359 | diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c | ||
| 360 | index 3eac97510d..db6913bc7a 100644 | ||
| 361 | --- a/src/journal/journalctl.c | 303 | --- a/src/journal/journalctl.c |
| 362 | +++ b/src/journal/journalctl.c | 304 | +++ b/src/journal/journalctl.c |
| 363 | @@ -72,6 +72,7 @@ | 305 | @@ -73,6 +73,7 @@ |
| 364 | #include "unit-name.h" | 306 | #include "unit-name.h" |
| 365 | #include "user-util.h" | 307 | #include "user-util.h" |
| 366 | #include "varlink.h" | 308 | #include "varlink.h" |
| @@ -368,8 +310,6 @@ index 3eac97510d..db6913bc7a 100644 | |||
| 368 | 310 | ||
| 369 | #define DEFAULT_FSS_INTERVAL_USEC (15*USEC_PER_MINUTE) | 311 | #define DEFAULT_FSS_INTERVAL_USEC (15*USEC_PER_MINUTE) |
| 370 | #define PROCESS_INOTIFY_INTERVAL 1024 /* Every 1,024 messages processed */ | 312 | #define PROCESS_INOTIFY_INTERVAL 1024 /* Every 1,024 messages processed */ |
| 371 | diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c | ||
| 372 | index 20f7396c74..3471311ef5 100644 | ||
| 373 | --- a/src/libsystemd/sd-bus/bus-message.c | 313 | --- a/src/libsystemd/sd-bus/bus-message.c |
| 374 | +++ b/src/libsystemd/sd-bus/bus-message.c | 314 | +++ b/src/libsystemd/sd-bus/bus-message.c |
| 375 | @@ -20,6 +20,7 @@ | 315 | @@ -20,6 +20,7 @@ |
| @@ -380,8 +320,6 @@ index 20f7396c74..3471311ef5 100644 | |||
| 380 | 320 | ||
| 381 | static int message_append_basic(sd_bus_message *m, char type, const void *p, const void **stored); | 321 | static int message_append_basic(sd_bus_message *m, char type, const void *p, const void **stored); |
| 382 | 322 | ||
| 383 | diff --git a/src/libsystemd/sd-bus/bus-objects.c b/src/libsystemd/sd-bus/bus-objects.c | ||
| 384 | index bfd42aea7d..daefc56e3e 100644 | ||
| 385 | --- a/src/libsystemd/sd-bus/bus-objects.c | 323 | --- a/src/libsystemd/sd-bus/bus-objects.c |
| 386 | +++ b/src/libsystemd/sd-bus/bus-objects.c | 324 | +++ b/src/libsystemd/sd-bus/bus-objects.c |
| 387 | @@ -12,6 +12,7 @@ | 325 | @@ -12,6 +12,7 @@ |
| @@ -392,11 +330,9 @@ index bfd42aea7d..daefc56e3e 100644 | |||
| 392 | 330 | ||
| 393 | static int node_vtable_get_userdata( | 331 | static int node_vtable_get_userdata( |
| 394 | sd_bus *bus, | 332 | sd_bus *bus, |
| 395 | diff --git a/src/libsystemd/sd-bus/bus-socket.c b/src/libsystemd/sd-bus/bus-socket.c | ||
| 396 | index 09eb49c37f..82f1b3d1be 100644 | ||
| 397 | --- a/src/libsystemd/sd-bus/bus-socket.c | 333 | --- a/src/libsystemd/sd-bus/bus-socket.c |
| 398 | +++ b/src/libsystemd/sd-bus/bus-socket.c | 334 | +++ b/src/libsystemd/sd-bus/bus-socket.c |
| 399 | @@ -27,6 +27,7 @@ | 335 | @@ -28,6 +28,7 @@ |
| 400 | #include "string-util.h" | 336 | #include "string-util.h" |
| 401 | #include "user-util.h" | 337 | #include "user-util.h" |
| 402 | #include "utf8.h" | 338 | #include "utf8.h" |
| @@ -404,11 +340,9 @@ index 09eb49c37f..82f1b3d1be 100644 | |||
| 404 | 340 | ||
| 405 | #define SNDBUF_SIZE (8*1024*1024) | 341 | #define SNDBUF_SIZE (8*1024*1024) |
| 406 | 342 | ||
| 407 | diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c | ||
| 408 | index ab8d4e4a60..7e35fbe9e6 100644 | ||
| 409 | --- a/src/libsystemd/sd-bus/sd-bus.c | 343 | --- a/src/libsystemd/sd-bus/sd-bus.c |
| 410 | +++ b/src/libsystemd/sd-bus/sd-bus.c | 344 | +++ b/src/libsystemd/sd-bus/sd-bus.c |
| 411 | @@ -42,6 +42,7 @@ | 345 | @@ -43,6 +43,7 @@ |
| 412 | #include "string-util.h" | 346 | #include "string-util.h" |
| 413 | #include "strv.h" | 347 | #include "strv.h" |
| 414 | #include "user-util.h" | 348 | #include "user-util.h" |
| @@ -416,8 +350,6 @@ index ab8d4e4a60..7e35fbe9e6 100644 | |||
| 416 | 350 | ||
| 417 | #define log_debug_bus_message(m) \ | 351 | #define log_debug_bus_message(m) \ |
| 418 | do { \ | 352 | do { \ |
| 419 | diff --git a/src/libsystemd/sd-bus/test-bus-benchmark.c b/src/libsystemd/sd-bus/test-bus-benchmark.c | ||
| 420 | index 13c08fe295..9aae83486e 100644 | ||
| 421 | --- a/src/libsystemd/sd-bus/test-bus-benchmark.c | 353 | --- a/src/libsystemd/sd-bus/test-bus-benchmark.c |
| 422 | +++ b/src/libsystemd/sd-bus/test-bus-benchmark.c | 354 | +++ b/src/libsystemd/sd-bus/test-bus-benchmark.c |
| 423 | @@ -14,6 +14,7 @@ | 355 | @@ -14,6 +14,7 @@ |
| @@ -428,11 +360,9 @@ index 13c08fe295..9aae83486e 100644 | |||
| 428 | 360 | ||
| 429 | #define MAX_SIZE (2*1024*1024) | 361 | #define MAX_SIZE (2*1024*1024) |
| 430 | 362 | ||
| 431 | diff --git a/src/libsystemd/sd-journal/sd-journal.c b/src/libsystemd/sd-journal/sd-journal.c | ||
| 432 | index b3240177cb..7e3ae2d24f 100644 | ||
| 433 | --- a/src/libsystemd/sd-journal/sd-journal.c | 363 | --- a/src/libsystemd/sd-journal/sd-journal.c |
| 434 | +++ b/src/libsystemd/sd-journal/sd-journal.c | 364 | +++ b/src/libsystemd/sd-journal/sd-journal.c |
| 435 | @@ -40,6 +40,7 @@ | 365 | @@ -41,6 +41,7 @@ |
| 436 | #include "string-util.h" | 366 | #include "string-util.h" |
| 437 | #include "strv.h" | 367 | #include "strv.h" |
| 438 | #include "syslog-util.h" | 368 | #include "syslog-util.h" |
| @@ -440,8 +370,6 @@ index b3240177cb..7e3ae2d24f 100644 | |||
| 440 | 370 | ||
| 441 | #define JOURNAL_FILES_MAX 7168 | 371 | #define JOURNAL_FILES_MAX 7168 |
| 442 | 372 | ||
| 443 | diff --git a/src/locale/keymap-util.c b/src/locale/keymap-util.c | ||
| 444 | index d2f0566dbc..3b7746557e 100644 | ||
| 445 | --- a/src/locale/keymap-util.c | 373 | --- a/src/locale/keymap-util.c |
| 446 | +++ b/src/locale/keymap-util.c | 374 | +++ b/src/locale/keymap-util.c |
| 447 | @@ -24,6 +24,7 @@ | 375 | @@ -24,6 +24,7 @@ |
| @@ -452,8 +380,6 @@ index d2f0566dbc..3b7746557e 100644 | |||
| 452 | 380 | ||
| 453 | static bool startswith_comma(const char *s, const char *prefix) { | 381 | static bool startswith_comma(const char *s, const char *prefix) { |
| 454 | s = startswith(s, prefix); | 382 | s = startswith(s, prefix); |
| 455 | diff --git a/src/login/pam_systemd.c b/src/login/pam_systemd.c | ||
| 456 | index f8bd17eefe..9633fbc152 100644 | ||
| 457 | --- a/src/login/pam_systemd.c | 383 | --- a/src/login/pam_systemd.c |
| 458 | +++ b/src/login/pam_systemd.c | 384 | +++ b/src/login/pam_systemd.c |
| 459 | @@ -31,6 +31,7 @@ | 385 | @@ -31,6 +31,7 @@ |
| @@ -464,8 +390,6 @@ index f8bd17eefe..9633fbc152 100644 | |||
| 464 | #include "pam-util.h" | 390 | #include "pam-util.h" |
| 465 | #include "parse-util.h" | 391 | #include "parse-util.h" |
| 466 | #include "path-util.h" | 392 | #include "path-util.h" |
| 467 | diff --git a/src/network/generator/network-generator.c b/src/network/generator/network-generator.c | ||
| 468 | index 60e074e99b..a728e3b7a1 100644 | ||
| 469 | --- a/src/network/generator/network-generator.c | 393 | --- a/src/network/generator/network-generator.c |
| 470 | +++ b/src/network/generator/network-generator.c | 394 | +++ b/src/network/generator/network-generator.c |
| 471 | @@ -13,6 +13,7 @@ | 395 | @@ -13,6 +13,7 @@ |
| @@ -476,8 +400,6 @@ index 60e074e99b..a728e3b7a1 100644 | |||
| 476 | 400 | ||
| 477 | /* | 401 | /* |
| 478 | # .network | 402 | # .network |
| 479 | diff --git a/src/nspawn/nspawn-settings.c b/src/nspawn/nspawn-settings.c | ||
| 480 | index 3847fe4ec4..3696b57baa 100644 | ||
| 481 | --- a/src/nspawn/nspawn-settings.c | 403 | --- a/src/nspawn/nspawn-settings.c |
| 482 | +++ b/src/nspawn/nspawn-settings.c | 404 | +++ b/src/nspawn/nspawn-settings.c |
| 483 | @@ -17,6 +17,7 @@ | 405 | @@ -17,6 +17,7 @@ |
| @@ -488,8 +410,6 @@ index 3847fe4ec4..3696b57baa 100644 | |||
| 488 | 410 | ||
| 489 | Settings *settings_new(void) { | 411 | Settings *settings_new(void) { |
| 490 | Settings *s; | 412 | Settings *s; |
| 491 | diff --git a/src/nss-mymachines/nss-mymachines.c b/src/nss-mymachines/nss-mymachines.c | ||
| 492 | index 44715bb3e5..bc1e688b5e 100644 | ||
| 493 | --- a/src/nss-mymachines/nss-mymachines.c | 413 | --- a/src/nss-mymachines/nss-mymachines.c |
| 494 | +++ b/src/nss-mymachines/nss-mymachines.c | 414 | +++ b/src/nss-mymachines/nss-mymachines.c |
| 495 | @@ -21,6 +21,7 @@ | 415 | @@ -21,6 +21,7 @@ |
| @@ -498,34 +418,28 @@ index 44715bb3e5..bc1e688b5e 100644 | |||
| 498 | #include "string-util.h" | 418 | #include "string-util.h" |
| 499 | +#include "missing_stdlib.h" | 419 | +#include "missing_stdlib.h" |
| 500 | 420 | ||
| 501 | static void setup_logging(void) { | 421 | static void setup_logging_once(void) { |
| 502 | /* We need a dummy function because log_parse_environment is a macro. */ | 422 | static pthread_once_t once = PTHREAD_ONCE_INIT; |
| 503 | diff --git a/src/portable/portable.c b/src/portable/portable.c | ||
| 504 | index 4cf5fb4f0a..577dc5c8d7 100644 | ||
| 505 | --- a/src/portable/portable.c | 423 | --- a/src/portable/portable.c |
| 506 | +++ b/src/portable/portable.c | 424 | +++ b/src/portable/portable.c |
| 507 | @@ -34,6 +34,7 @@ | 425 | @@ -39,6 +39,7 @@ |
| 508 | #include "strv.h" | 426 | #include "strv.h" |
| 509 | #include "tmpfile-util.h" | 427 | #include "tmpfile-util.h" |
| 510 | #include "user-util.h" | 428 | #include "user-util.h" |
| 511 | +#include "missing_stdlib.h" | 429 | +#include "missing_stdlib.h" |
| 512 | 430 | ||
| 513 | static const char profile_dirs[] = CONF_PATHS_NULSTR("systemd/portable/profile"); | 431 | /* Markers used in the first line of our 20-portable.conf unit file drop-in to determine, that a) the unit file was |
| 514 | 432 | * dropped there by the portable service logic and b) for which image it was dropped there. */ | |
| 515 | diff --git a/src/resolve/resolvectl.c b/src/resolve/resolvectl.c | ||
| 516 | index 7d13ed3905..ddc37115b8 100644 | ||
| 517 | --- a/src/resolve/resolvectl.c | 433 | --- a/src/resolve/resolvectl.c |
| 518 | +++ b/src/resolve/resolvectl.c | 434 | +++ b/src/resolve/resolvectl.c |
| 519 | @@ -41,6 +41,7 @@ | 435 | @@ -43,6 +43,7 @@ |
| 520 | #include "terminal-util.h" | ||
| 521 | #include "utf8.h" | 436 | #include "utf8.h" |
| 437 | #include "verb-log-control.h" | ||
| 522 | #include "verbs.h" | 438 | #include "verbs.h" |
| 523 | +#include "missing_stdlib.h" | 439 | +#include "missing_stdlib.h" |
| 524 | 440 | ||
| 525 | static int arg_family = AF_UNSPEC; | 441 | static int arg_family = AF_UNSPEC; |
| 526 | static int arg_ifindex = 0; | 442 | static int arg_ifindex = 0; |
| 527 | diff --git a/src/shared/bus-get-properties.c b/src/shared/bus-get-properties.c | ||
| 528 | index feb6d3807f..eb11d29e50 100644 | ||
| 529 | --- a/src/shared/bus-get-properties.c | 443 | --- a/src/shared/bus-get-properties.c |
| 530 | +++ b/src/shared/bus-get-properties.c | 444 | +++ b/src/shared/bus-get-properties.c |
| 531 | @@ -4,6 +4,7 @@ | 445 | @@ -4,6 +4,7 @@ |
| @@ -536,8 +450,6 @@ index feb6d3807f..eb11d29e50 100644 | |||
| 536 | 450 | ||
| 537 | int bus_property_get_bool( | 451 | int bus_property_get_bool( |
| 538 | sd_bus *bus, | 452 | sd_bus *bus, |
| 539 | diff --git a/src/shared/bus-unit-procs.c b/src/shared/bus-unit-procs.c | ||
| 540 | index 6f4a71138c..4a46de2c1b 100644 | ||
| 541 | --- a/src/shared/bus-unit-procs.c | 453 | --- a/src/shared/bus-unit-procs.c |
| 542 | +++ b/src/shared/bus-unit-procs.c | 454 | +++ b/src/shared/bus-unit-procs.c |
| 543 | @@ -10,6 +10,7 @@ | 455 | @@ -10,6 +10,7 @@ |
| @@ -548,11 +460,9 @@ index 6f4a71138c..4a46de2c1b 100644 | |||
| 548 | 460 | ||
| 549 | struct CGroupInfo { | 461 | struct CGroupInfo { |
| 550 | char *cgroup_path; | 462 | char *cgroup_path; |
| 551 | diff --git a/src/shared/bus-unit-util.c b/src/shared/bus-unit-util.c | ||
| 552 | index d3a5b25d18..003594e2d7 100644 | ||
| 553 | --- a/src/shared/bus-unit-util.c | 463 | --- a/src/shared/bus-unit-util.c |
| 554 | +++ b/src/shared/bus-unit-util.c | 464 | +++ b/src/shared/bus-unit-util.c |
| 555 | @@ -47,6 +47,7 @@ | 465 | @@ -49,6 +49,7 @@ |
| 556 | #include "unit-def.h" | 466 | #include "unit-def.h" |
| 557 | #include "user-util.h" | 467 | #include "user-util.h" |
| 558 | #include "utf8.h" | 468 | #include "utf8.h" |
| @@ -560,8 +470,6 @@ index d3a5b25d18..003594e2d7 100644 | |||
| 560 | 470 | ||
| 561 | int bus_parse_unit_info(sd_bus_message *message, UnitInfo *u) { | 471 | int bus_parse_unit_info(sd_bus_message *message, UnitInfo *u) { |
| 562 | assert(message); | 472 | assert(message); |
| 563 | diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c | ||
| 564 | index 64ca67993c..31e3d148ea 100644 | ||
| 565 | --- a/src/shared/bus-util.c | 473 | --- a/src/shared/bus-util.c |
| 566 | +++ b/src/shared/bus-util.c | 474 | +++ b/src/shared/bus-util.c |
| 567 | @@ -21,6 +21,7 @@ | 475 | @@ -21,6 +21,7 @@ |
| @@ -572,8 +480,6 @@ index 64ca67993c..31e3d148ea 100644 | |||
| 572 | 480 | ||
| 573 | static int name_owner_change_callback(sd_bus_message *m, void *userdata, sd_bus_error *ret_error) { | 481 | static int name_owner_change_callback(sd_bus_message *m, void *userdata, sd_bus_error *ret_error) { |
| 574 | sd_event *e = userdata; | 482 | sd_event *e = userdata; |
| 575 | diff --git a/src/shared/dns-domain.c b/src/shared/dns-domain.c | ||
| 576 | index 787bb8fec9..009589a16f 100644 | ||
| 577 | --- a/src/shared/dns-domain.c | 483 | --- a/src/shared/dns-domain.c |
| 578 | +++ b/src/shared/dns-domain.c | 484 | +++ b/src/shared/dns-domain.c |
| 579 | @@ -17,6 +17,7 @@ | 485 | @@ -17,6 +17,7 @@ |
| @@ -584,8 +490,6 @@ index 787bb8fec9..009589a16f 100644 | |||
| 584 | 490 | ||
| 585 | int dns_label_unescape(const char **name, char *dest, size_t sz, DNSLabelFlags flags) { | 491 | int dns_label_unescape(const char **name, char *dest, size_t sz, DNSLabelFlags flags) { |
| 586 | const char *n; | 492 | const char *n; |
| 587 | diff --git a/src/shared/journal-importer.c b/src/shared/journal-importer.c | ||
| 588 | index 9e11dc09c1..f9954c1520 100644 | ||
| 589 | --- a/src/shared/journal-importer.c | 493 | --- a/src/shared/journal-importer.c |
| 590 | +++ b/src/shared/journal-importer.c | 494 | +++ b/src/shared/journal-importer.c |
| 591 | @@ -15,6 +15,7 @@ | 495 | @@ -15,6 +15,7 @@ |
| @@ -596,11 +500,9 @@ index 9e11dc09c1..f9954c1520 100644 | |||
| 596 | 500 | ||
| 597 | enum { | 501 | enum { |
| 598 | IMPORTER_STATE_LINE = 0, /* waiting to read, or reading line */ | 502 | IMPORTER_STATE_LINE = 0, /* waiting to read, or reading line */ |
| 599 | diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c | ||
| 600 | index e63c59bd94..dd9773c009 100644 | ||
| 601 | --- a/src/shared/logs-show.c | 503 | --- a/src/shared/logs-show.c |
| 602 | +++ b/src/shared/logs-show.c | 504 | +++ b/src/shared/logs-show.c |
| 603 | @@ -41,6 +41,7 @@ | 505 | @@ -42,6 +42,7 @@ |
| 604 | #include "utf8.h" | 506 | #include "utf8.h" |
| 605 | #include "util.h" | 507 | #include "util.h" |
| 606 | #include "web-util.h" | 508 | #include "web-util.h" |
| @@ -608,8 +510,6 @@ index e63c59bd94..dd9773c009 100644 | |||
| 608 | 510 | ||
| 609 | /* up to three lines (each up to 100 characters) or 300 characters, whichever is less */ | 511 | /* up to three lines (each up to 100 characters) or 300 characters, whichever is less */ |
| 610 | #define PRINT_LINE_THRESHOLD 3 | 512 | #define PRINT_LINE_THRESHOLD 3 |
| 611 | diff --git a/src/shared/pager.c b/src/shared/pager.c | ||
| 612 | index 4bbad7e37b..eefcdd068c 100644 | ||
| 613 | --- a/src/shared/pager.c | 513 | --- a/src/shared/pager.c |
| 614 | +++ b/src/shared/pager.c | 514 | +++ b/src/shared/pager.c |
| 615 | @@ -26,6 +26,7 @@ | 515 | @@ -26,6 +26,7 @@ |
| @@ -620,8 +520,6 @@ index 4bbad7e37b..eefcdd068c 100644 | |||
| 620 | 520 | ||
| 621 | static pid_t pager_pid = 0; | 521 | static pid_t pager_pid = 0; |
| 622 | 522 | ||
| 623 | diff --git a/src/shared/uid-range.c b/src/shared/uid-range.c | ||
| 624 | index 5d5bf7f21d..f1002ffa6c 100644 | ||
| 625 | --- a/src/shared/uid-range.c | 523 | --- a/src/shared/uid-range.c |
| 626 | +++ b/src/shared/uid-range.c | 524 | +++ b/src/shared/uid-range.c |
| 627 | @@ -9,6 +9,7 @@ | 525 | @@ -9,6 +9,7 @@ |
| @@ -632,8 +530,6 @@ index 5d5bf7f21d..f1002ffa6c 100644 | |||
| 632 | 530 | ||
| 633 | static bool uid_range_intersect(UidRange *range, uid_t start, uid_t nr) { | 531 | static bool uid_range_intersect(UidRange *range, uid_t start, uid_t nr) { |
| 634 | assert(range); | 532 | assert(range); |
| 635 | diff --git a/src/socket-proxy/socket-proxyd.c b/src/socket-proxy/socket-proxyd.c | ||
| 636 | index 6e3ee0d76b..7727e33d95 100644 | ||
| 637 | --- a/src/socket-proxy/socket-proxyd.c | 533 | --- a/src/socket-proxy/socket-proxyd.c |
| 638 | +++ b/src/socket-proxy/socket-proxyd.c | 534 | +++ b/src/socket-proxy/socket-proxyd.c |
| 639 | @@ -26,6 +26,7 @@ | 535 | @@ -26,6 +26,7 @@ |
| @@ -644,20 +540,16 @@ index 6e3ee0d76b..7727e33d95 100644 | |||
| 644 | 540 | ||
| 645 | #define BUFFER_SIZE (256 * 1024) | 541 | #define BUFFER_SIZE (256 * 1024) |
| 646 | 542 | ||
| 647 | diff --git a/src/test/test-hexdecoct.c b/src/test/test-hexdecoct.c | ||
| 648 | index c9d318b8d1..fcb8d40805 100644 | ||
| 649 | --- a/src/test/test-hexdecoct.c | 543 | --- a/src/test/test-hexdecoct.c |
| 650 | +++ b/src/test/test-hexdecoct.c | 544 | +++ b/src/test/test-hexdecoct.c |
| 651 | @@ -6,6 +6,7 @@ | 545 | @@ -7,6 +7,7 @@ |
| 652 | #include "hexdecoct.h" | ||
| 653 | #include "macro.h" | 546 | #include "macro.h" |
| 547 | #include "random-util.h" | ||
| 654 | #include "string-util.h" | 548 | #include "string-util.h" |
| 655 | +#include "missing_stdlib.h" | 549 | +#include "missing_stdlib.h" |
| 550 | #include "tests.h" | ||
| 656 | 551 | ||
| 657 | static void test_hexchar(void) { | 552 | TEST(hexchar) { |
| 658 | assert_se(hexchar(0xa) == 'a'); | ||
| 659 | diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c | ||
| 660 | index 65c40de4c8..4ef9a0c6c8 100644 | ||
| 661 | --- a/src/udev/udev-builtin-path_id.c | 553 | --- a/src/udev/udev-builtin-path_id.c |
| 662 | +++ b/src/udev/udev-builtin-path_id.c | 554 | +++ b/src/udev/udev-builtin-path_id.c |
| 663 | @@ -22,6 +22,7 @@ | 555 | @@ -22,6 +22,7 @@ |
| @@ -668,11 +560,9 @@ index 65c40de4c8..4ef9a0c6c8 100644 | |||
| 668 | 560 | ||
| 669 | _printf_(2,3) | 561 | _printf_(2,3) |
| 670 | static void path_prepend(char **path, const char *fmt, ...) { | 562 | static void path_prepend(char **path, const char *fmt, ...) { |
| 671 | diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c | ||
| 672 | index 9854270b27..71b5fab1e7 100644 | ||
| 673 | --- a/src/udev/udev-event.c | 563 | --- a/src/udev/udev-event.c |
| 674 | +++ b/src/udev/udev-event.c | 564 | +++ b/src/udev/udev-event.c |
| 675 | @@ -34,6 +34,7 @@ | 565 | @@ -35,6 +35,7 @@ |
| 676 | #include "udev-util.h" | 566 | #include "udev-util.h" |
| 677 | #include "udev-watch.h" | 567 | #include "udev-watch.h" |
| 678 | #include "user-util.h" | 568 | #include "user-util.h" |
| @@ -680,11 +570,9 @@ index 9854270b27..71b5fab1e7 100644 | |||
| 680 | 570 | ||
| 681 | typedef struct Spawn { | 571 | typedef struct Spawn { |
| 682 | sd_device *device; | 572 | sd_device *device; |
| 683 | diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c | ||
| 684 | index bf997fc0ed..e3f5f1f2e2 100644 | ||
| 685 | --- a/src/udev/udev-rules.c | 573 | --- a/src/udev/udev-rules.c |
| 686 | +++ b/src/udev/udev-rules.c | 574 | +++ b/src/udev/udev-rules.c |
| 687 | @@ -33,6 +33,7 @@ | 575 | @@ -34,6 +34,7 @@ |
| 688 | #include "udev-util.h" | 576 | #include "udev-util.h" |
| 689 | #include "user-util.h" | 577 | #include "user-util.h" |
| 690 | #include "virt.h" | 578 | #include "virt.h" |
| @@ -692,3 +580,23 @@ index bf997fc0ed..e3f5f1f2e2 100644 | |||
| 692 | 580 | ||
| 693 | #define RULES_DIRS (const char* const*) CONF_PATHS_STRV("udev/rules.d") | 581 | #define RULES_DIRS (const char* const*) CONF_PATHS_STRV("udev/rules.d") |
| 694 | 582 | ||
| 583 | --- a/src/core/dbus-cgroup.c | ||
| 584 | +++ b/src/core/dbus-cgroup.c | ||
| 585 | @@ -21,6 +21,7 @@ | ||
| 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/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch b/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch deleted file mode 100644 index 3875753ff4..0000000000 --- a/meta/recipes-core/systemd/systemd/0006-Include-netinet-if_ether.h.patch +++ /dev/null | |||
| @@ -1,382 +0,0 @@ | |||
| 1 | From a3be3b7160856ffb8259ede9e2e0168d74bf126e Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Thu, 26 Oct 2017 22:10:42 -0700 | ||
| 4 | Subject: [PATCH] Include netinet/if_ether.h | ||
| 5 | |||
| 6 | Fixes | ||
| 7 | /path/to/systemd/recipe-sysroot/usr/include/netinet/if_ether.h:101:8: error: redefinition of 'struct ethhdr' | ||
| 8 | struct ethhdr { | ||
| 9 | ^~~~~~ | ||
| 10 | |||
| 11 | and related arphdr, arpreq, and arpreq_old errors | ||
| 12 | /path/to/systemd/recipe-sysroot/usr/include/net/if_arp.h:22:8: error: redefinition of 'struct arphdr' | ||
| 13 | struct arphdr { | ||
| 14 | ^~~~~~ | ||
| 15 | |||
| 16 | The latter requires removing some includes of net/if_arp.h to avoid | ||
| 17 | conflicting with netinet/if_ether.h. | ||
| 18 | |||
| 19 | Upstream-Status: Inappropriate [musl specific] | ||
| 20 | |||
| 21 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 22 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
| 23 | [rebased for systemd 243] | ||
| 24 | Signed-off-by: Scott Murray <scott.murray@konsulko.com> | ||
| 25 | |||
| 26 | Upstream-Status: Inappropriate [musl specific] | ||
| 27 | |||
| 28 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 29 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
| 30 | [rebased for systemd 243] | ||
| 31 | Signed-off-by: Scott Murray <scott.murray@konsulko.com> | ||
| 32 | [rebased for systemd 247] | ||
| 33 | Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | ||
| 34 | |||
| 35 | --- | ||
| 36 | src/basic/linux/in6.h | 14 +++++++------- | ||
| 37 | src/libsystemd-network/sd-dhcp6-client.c | 1 - | ||
| 38 | src/libsystemd/sd-netlink/netlink-types.c | 1 + | ||
| 39 | src/machine/machine-dbus.c | 1 + | ||
| 40 | src/network/netdev/bond.c | 1 + | ||
| 41 | src/network/netdev/bridge.c | 1 + | ||
| 42 | src/network/netdev/macsec.c | 1 + | ||
| 43 | src/network/netdev/netdev-gperf.gperf | 1 + | ||
| 44 | src/network/netdev/netdev.c | 1 + | ||
| 45 | src/network/networkd-bridge-vlan.c | 1 + | ||
| 46 | src/network/networkd-dhcp-common.c | 4 +++- | ||
| 47 | src/network/networkd-dhcp-server.c | 4 ++-- | ||
| 48 | src/network/networkd-dhcp4.c | 2 +- | ||
| 49 | src/network/networkd-dhcp6.c | 2 +- | ||
| 50 | src/network/networkd-link.c | 2 +- | ||
| 51 | src/network/networkd-network.c | 1 + | ||
| 52 | src/network/networkd-route.c | 1 + | ||
| 53 | src/network/networkd-setlink.c | 2 +- | ||
| 54 | src/network/test-network-tables.c | 1 + | ||
| 55 | src/shared/ethtool-util.c | 1 + | ||
| 56 | src/shared/ethtool-util.h | 1 + | ||
| 57 | src/udev/net/link-config.c | 1 + | ||
| 58 | src/udev/udev-builtin-net_setup_link.c | 1 + | ||
| 59 | 23 files changed, 31 insertions(+), 15 deletions(-) | ||
| 60 | |||
| 61 | diff --git a/src/basic/linux/in6.h b/src/basic/linux/in6.h | ||
| 62 | index 5ad396a57e..1dc007fe13 100644 | ||
| 63 | --- a/src/basic/linux/in6.h | ||
| 64 | +++ b/src/basic/linux/in6.h | ||
| 65 | @@ -1,10 +1,10 @@ | ||
| 66 | /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ | ||
| 67 | /* | ||
| 68 | - * Types and definitions for AF_INET6 | ||
| 69 | - * Linux INET6 implementation | ||
| 70 | + * Types and definitions for AF_INET6 | ||
| 71 | + * Linux INET6 implementation | ||
| 72 | * | ||
| 73 | * Authors: | ||
| 74 | - * Pedro Roque <roque@di.fc.ul.pt> | ||
| 75 | + * Pedro Roque <roque@di.fc.ul.pt> | ||
| 76 | * | ||
| 77 | * Sources: | ||
| 78 | * IPv6 Program Interfaces for BSD Systems | ||
| 79 | @@ -19,8 +19,8 @@ | ||
| 80 | * 2 of the License, or (at your option) any later version. | ||
| 81 | */ | ||
| 82 | |||
| 83 | -#ifndef _UAPI_LINUX_IN6_H | ||
| 84 | -#define _UAPI_LINUX_IN6_H | ||
| 85 | +#ifndef _LINUX_IN6_H | ||
| 86 | +#define _LINUX_IN6_H | ||
| 87 | |||
| 88 | #include <linux/types.h> | ||
| 89 | #include <linux/libc-compat.h> | ||
| 90 | @@ -97,7 +97,7 @@ struct in6_flowlabel_req { | ||
| 91 | |||
| 92 | |||
| 93 | /* | ||
| 94 | - * Bitmask constant declarations to help applications select out the | ||
| 95 | + * Bitmask constant declarations to help applications select out the | ||
| 96 | * flow label and priority fields. | ||
| 97 | * | ||
| 98 | * Note that this are in host byte order while the flowinfo field of | ||
| 99 | @@ -298,4 +298,4 @@ struct in6_flowlabel_req { | ||
| 100 | * ... | ||
| 101 | * MRT6_MAX | ||
| 102 | */ | ||
| 103 | -#endif /* _UAPI_LINUX_IN6_H */ | ||
| 104 | +#endif /* _LINUX_IN6_H */ | ||
| 105 | diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c | ||
| 106 | index efbf7d7df3..86906332b6 100644 | ||
| 107 | --- a/src/libsystemd-network/sd-dhcp6-client.c | ||
| 108 | +++ b/src/libsystemd-network/sd-dhcp6-client.c | ||
| 109 | @@ -5,7 +5,6 @@ | ||
| 110 | |||
| 111 | #include <errno.h> | ||
| 112 | #include <sys/ioctl.h> | ||
| 113 | -#include <linux/if_arp.h> | ||
| 114 | #include <linux/if_infiniband.h> | ||
| 115 | |||
| 116 | #include "sd-dhcp6-client.h" | ||
| 117 | diff --git a/src/libsystemd/sd-netlink/netlink-types.c b/src/libsystemd/sd-netlink/netlink-types.c | ||
| 118 | index beb926d40b..41de212242 100644 | ||
| 119 | --- a/src/libsystemd/sd-netlink/netlink-types.c | ||
| 120 | +++ b/src/libsystemd/sd-netlink/netlink-types.c | ||
| 121 | @@ -3,6 +3,7 @@ | ||
| 122 | #include <netinet/in.h> | ||
| 123 | #include <stdint.h> | ||
| 124 | #include <sys/socket.h> | ||
| 125 | +#include <netinet/if_ether.h> | ||
| 126 | #include <linux/can/vxcan.h> | ||
| 127 | #include <linux/netlink.h> | ||
| 128 | #include <linux/rtnetlink.h> | ||
| 129 | diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c | ||
| 130 | index 0022a980c5..fc22e51409 100644 | ||
| 131 | --- a/src/machine/machine-dbus.c | ||
| 132 | +++ b/src/machine/machine-dbus.c | ||
| 133 | @@ -3,6 +3,7 @@ | ||
| 134 | #include <errno.h> | ||
| 135 | #include <sys/mount.h> | ||
| 136 | #include <sys/wait.h> | ||
| 137 | +#include <netinet/if_ether.h> | ||
| 138 | |||
| 139 | /* When we include libgen.h because we need dirname() we immediately | ||
| 140 | * undefine basename() since libgen.h defines it as a macro to the POSIX | ||
| 141 | diff --git a/src/network/netdev/bond.c b/src/network/netdev/bond.c | ||
| 142 | index a7a4adce45..eb111a6c48 100644 | ||
| 143 | --- a/src/network/netdev/bond.c | ||
| 144 | +++ b/src/network/netdev/bond.c | ||
| 145 | @@ -1,5 +1,6 @@ | ||
| 146 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
| 147 | |||
| 148 | +#include <netinet/if_ether.h> | ||
| 149 | #include "alloc-util.h" | ||
| 150 | #include "bond.h" | ||
| 151 | #include "bond-util.h" | ||
| 152 | diff --git a/src/network/netdev/bridge.c b/src/network/netdev/bridge.c | ||
| 153 | index 99fb9e1c3c..ecc6ca91bf 100644 | ||
| 154 | --- a/src/network/netdev/bridge.c | ||
| 155 | +++ b/src/network/netdev/bridge.c | ||
| 156 | @@ -1,5 +1,6 @@ | ||
| 157 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
| 158 | |||
| 159 | +#include <netinet/if_ether.h> | ||
| 160 | #include <net/if.h> | ||
| 161 | |||
| 162 | #include "bridge.h" | ||
| 163 | diff --git a/src/network/netdev/macsec.c b/src/network/netdev/macsec.c | ||
| 164 | index 77c5f8c4e7..04be1b4ab2 100644 | ||
| 165 | --- a/src/network/netdev/macsec.c | ||
| 166 | +++ b/src/network/netdev/macsec.c | ||
| 167 | @@ -1,5 +1,6 @@ | ||
| 168 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
| 169 | |||
| 170 | +#include <netinet/if_ether.h> | ||
| 171 | #include <netinet/in.h> | ||
| 172 | #include <linux/if_ether.h> | ||
| 173 | #include <linux/if_macsec.h> | ||
| 174 | diff --git a/src/network/netdev/netdev-gperf.gperf b/src/network/netdev/netdev-gperf.gperf | ||
| 175 | index 9dd081425e..130e5b3d3c 100644 | ||
| 176 | --- a/src/network/netdev/netdev-gperf.gperf | ||
| 177 | +++ b/src/network/netdev/netdev-gperf.gperf | ||
| 178 | @@ -3,6 +3,7 @@ | ||
| 179 | #if __GNUC__ >= 7 | ||
| 180 | _Pragma("GCC diagnostic ignored \"-Wimplicit-fallthrough\"") | ||
| 181 | #endif | ||
| 182 | +#include <netinet/if_ether.h> | ||
| 183 | #include <stddef.h> | ||
| 184 | #include "bareudp.h" | ||
| 185 | #include "batadv.h" | ||
| 186 | diff --git a/src/network/netdev/netdev.c b/src/network/netdev/netdev.c | ||
| 187 | index 53534d4873..1cfda9469f 100644 | ||
| 188 | --- a/src/network/netdev/netdev.c | ||
| 189 | +++ b/src/network/netdev/netdev.c | ||
| 190 | @@ -1,5 +1,6 @@ | ||
| 191 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
| 192 | |||
| 193 | +#include <netinet/if_ether.h> | ||
| 194 | #include <net/if.h> | ||
| 195 | #include <netinet/in.h> | ||
| 196 | #include <unistd.h> | ||
| 197 | diff --git a/src/network/networkd-bridge-vlan.c b/src/network/networkd-bridge-vlan.c | ||
| 198 | index 3153bf6984..687a26b057 100644 | ||
| 199 | --- a/src/network/networkd-bridge-vlan.c | ||
| 200 | +++ b/src/network/networkd-bridge-vlan.c | ||
| 201 | @@ -4,6 +4,7 @@ | ||
| 202 | ***/ | ||
| 203 | |||
| 204 | #include <netinet/in.h> | ||
| 205 | +#include <netinet/if_ether.h> | ||
| 206 | #include <linux/if_bridge.h> | ||
| 207 | #include <stdbool.h> | ||
| 208 | |||
| 209 | diff --git a/src/network/networkd-dhcp-common.c b/src/network/networkd-dhcp-common.c | ||
| 210 | index 249d780887..edd2e9adf8 100644 | ||
| 211 | --- a/src/network/networkd-dhcp-common.c | ||
| 212 | +++ b/src/network/networkd-dhcp-common.c | ||
| 213 | @@ -1,7 +1,8 @@ | ||
| 214 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
| 215 | |||
| 216 | #include <netinet/in.h> | ||
| 217 | -#include <linux/if_arp.h> | ||
| 218 | +#include <net/if_arp.h> | ||
| 219 | +#include <net/if.h> | ||
| 220 | |||
| 221 | #include "bus-error.h" | ||
| 222 | #include "dhcp-identifier.h" | ||
| 223 | @@ -13,6 +14,7 @@ | ||
| 224 | #include "networkd-dhcp-common.h" | ||
| 225 | #include "networkd-link.h" | ||
| 226 | #include "networkd-manager.h" | ||
| 227 | +#include <netinet/if_ether.h> | ||
| 228 | #include "networkd-network.h" | ||
| 229 | #include "parse-util.h" | ||
| 230 | #include "socket-util.h" | ||
| 231 | diff --git a/src/network/networkd-dhcp-server.c b/src/network/networkd-dhcp-server.c | ||
| 232 | index 9e2faa5675..fd8d817569 100644 | ||
| 233 | --- a/src/network/networkd-dhcp-server.c | ||
| 234 | +++ b/src/network/networkd-dhcp-server.c | ||
| 235 | @@ -1,8 +1,8 @@ | ||
| 236 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
| 237 | |||
| 238 | #include <netinet/in.h> | ||
| 239 | -#include <linux/if_arp.h> | ||
| 240 | -#include <linux/if.h> | ||
| 241 | +#include <net/if_arp.h> | ||
| 242 | +#include <net/if.h> | ||
| 243 | |||
| 244 | #include "sd-dhcp-server.h" | ||
| 245 | |||
| 246 | diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c | ||
| 247 | index f80adcdbcf..3311e2a718 100644 | ||
| 248 | --- a/src/network/networkd-dhcp4.c | ||
| 249 | +++ b/src/network/networkd-dhcp4.c | ||
| 250 | @@ -1,9 +1,9 @@ | ||
| 251 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
| 252 | |||
| 253 | +#include <netinet/if_ether.h> | ||
| 254 | #include <netinet/in.h> | ||
| 255 | #include <netinet/ip.h> | ||
| 256 | #include <linux/if.h> | ||
| 257 | -#include <linux/if_arp.h> | ||
| 258 | |||
| 259 | #include "escape.h" | ||
| 260 | #include "alloc-util.h" | ||
| 261 | diff --git a/src/network/networkd-dhcp6.c b/src/network/networkd-dhcp6.c | ||
| 262 | index 2b72b618fc..d0d4cfb384 100644 | ||
| 263 | --- a/src/network/networkd-dhcp6.c | ||
| 264 | +++ b/src/network/networkd-dhcp6.c | ||
| 265 | @@ -3,9 +3,9 @@ | ||
| 266 | Copyright © 2014 Intel Corporation. All rights reserved. | ||
| 267 | ***/ | ||
| 268 | |||
| 269 | +#include <netinet/if_ether.h> | ||
| 270 | #include <netinet/in.h> | ||
| 271 | #include <linux/if.h> | ||
| 272 | -#include <linux/if_arp.h> | ||
| 273 | |||
| 274 | #include "sd-dhcp6-client.h" | ||
| 275 | |||
| 276 | diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c | ||
| 277 | index 20675f2306..2884511ff3 100644 | ||
| 278 | --- a/src/network/networkd-link.c | ||
| 279 | +++ b/src/network/networkd-link.c | ||
| 280 | @@ -1,9 +1,9 @@ | ||
| 281 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
| 282 | |||
| 283 | #include <net/if.h> | ||
| 284 | +#include <netinet/if_ether.h> | ||
| 285 | #include <netinet/in.h> | ||
| 286 | #include <linux/if.h> | ||
| 287 | -#include <linux/if_arp.h> | ||
| 288 | #include <linux/if_link.h> | ||
| 289 | #include <linux/netdevice.h> | ||
| 290 | #include <sys/socket.h> | ||
| 291 | diff --git a/src/network/networkd-network.c b/src/network/networkd-network.c | ||
| 292 | index 850b4f449e..6f85d41328 100644 | ||
| 293 | --- a/src/network/networkd-network.c | ||
| 294 | +++ b/src/network/networkd-network.c | ||
| 295 | @@ -1,5 +1,6 @@ | ||
| 296 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
| 297 | |||
| 298 | +#include <netinet/if_ether.h> | ||
| 299 | #include <net/if.h> | ||
| 300 | #include <netinet/in.h> | ||
| 301 | #include <linux/netdevice.h> | ||
| 302 | diff --git a/src/network/networkd-route.c b/src/network/networkd-route.c | ||
| 303 | index eeba31c45d..0a2b0ed42b 100644 | ||
| 304 | --- a/src/network/networkd-route.c | ||
| 305 | +++ b/src/network/networkd-route.c | ||
| 306 | @@ -1,5 +1,6 @@ | ||
| 307 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
| 308 | |||
| 309 | +#include <netinet/in.h> | ||
| 310 | #include <linux/icmpv6.h> | ||
| 311 | #include <linux/ipv6_route.h> | ||
| 312 | #include <linux/nexthop.h> | ||
| 313 | diff --git a/src/network/networkd-setlink.c b/src/network/networkd-setlink.c | ||
| 314 | index 13c4cedd10..6558d551ab 100644 | ||
| 315 | --- a/src/network/networkd-setlink.c | ||
| 316 | +++ b/src/network/networkd-setlink.c | ||
| 317 | @@ -1,8 +1,8 @@ | ||
| 318 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
| 319 | |||
| 320 | #include <netinet/in.h> | ||
| 321 | +#include <net/if_arp.h> | ||
| 322 | #include <linux/if.h> | ||
| 323 | -#include <linux/if_arp.h> | ||
| 324 | |||
| 325 | #include "missing_network.h" | ||
| 326 | #include "netlink-util.h" | ||
| 327 | diff --git a/src/network/test-network-tables.c b/src/network/test-network-tables.c | ||
| 328 | index f55e524ae9..83d5c7cef3 100644 | ||
| 329 | --- a/src/network/test-network-tables.c | ||
| 330 | +++ b/src/network/test-network-tables.c | ||
| 331 | @@ -1,5 +1,6 @@ | ||
| 332 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
| 333 | |||
| 334 | +#include <netinet/if_ether.h> | ||
| 335 | #include "bond.h" | ||
| 336 | #include "dhcp6-internal.h" | ||
| 337 | #include "dhcp6-protocol.h" | ||
| 338 | diff --git a/src/shared/ethtool-util.c b/src/shared/ethtool-util.c | ||
| 339 | index f77f6943ca..0e1506e04b 100644 | ||
| 340 | --- a/src/shared/ethtool-util.c | ||
| 341 | +++ b/src/shared/ethtool-util.c | ||
| 342 | @@ -1,5 +1,6 @@ | ||
| 343 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
| 344 | |||
| 345 | +#include <netinet/if_ether.h> | ||
| 346 | #include <net/if.h> | ||
| 347 | #include <sys/ioctl.h> | ||
| 348 | #include <linux/ethtool.h> | ||
| 349 | diff --git a/src/shared/ethtool-util.h b/src/shared/ethtool-util.h | ||
| 350 | index 7d28766624..e98a25418b 100644 | ||
| 351 | --- a/src/shared/ethtool-util.h | ||
| 352 | +++ b/src/shared/ethtool-util.h | ||
| 353 | @@ -3,6 +3,7 @@ | ||
| 354 | |||
| 355 | #include <macro.h> | ||
| 356 | #include <net/ethernet.h> | ||
| 357 | +#include <netinet/if_ether.h> | ||
| 358 | #include <linux/ethtool.h> | ||
| 359 | |||
| 360 | #include "conf-parser.h" | ||
| 361 | diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c | ||
| 362 | index 8dfe23691b..e269856337 100644 | ||
| 363 | --- a/src/udev/net/link-config.c | ||
| 364 | +++ b/src/udev/net/link-config.c | ||
| 365 | @@ -1,5 +1,6 @@ | ||
| 366 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
| 367 | |||
| 368 | +#include <netinet/if_ether.h> | ||
| 369 | #include <linux/netdevice.h> | ||
| 370 | #include <netinet/ether.h> | ||
| 371 | #include <unistd.h> | ||
| 372 | diff --git a/src/udev/udev-builtin-net_setup_link.c b/src/udev/udev-builtin-net_setup_link.c | ||
| 373 | index 5964e30bf1..52a18d7a7f 100644 | ||
| 374 | --- a/src/udev/udev-builtin-net_setup_link.c | ||
| 375 | +++ b/src/udev/udev-builtin-net_setup_link.c | ||
| 376 | @@ -1,5 +1,6 @@ | ||
| 377 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ | ||
| 378 | |||
| 379 | +#include <netinet/if_ether.h> | ||
| 380 | #include "alloc-util.h" | ||
| 381 | #include "device-util.h" | ||
| 382 | #include "errno-util.h" | ||
diff --git a/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch b/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch index 1d8c481467..846c01bd4f 100644 --- a/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch +++ b/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch | |||
| @@ -23,8 +23,6 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
| 23 | src/tmpfiles/tmpfiles.c | 10 ++++++++++ | 23 | src/tmpfiles/tmpfiles.c | 10 ++++++++++ |
| 24 | 3 files changed, 38 insertions(+) | 24 | 3 files changed, 38 insertions(+) |
| 25 | 25 | ||
| 26 | diff --git a/src/basic/glob-util.c b/src/basic/glob-util.c | ||
| 27 | index e026b29478..815e56ef68 100644 | ||
| 28 | --- a/src/basic/glob-util.c | 26 | --- a/src/basic/glob-util.c |
| 29 | +++ b/src/basic/glob-util.c | 27 | +++ b/src/basic/glob-util.c |
| 30 | @@ -12,6 +12,12 @@ | 28 | @@ -12,6 +12,12 @@ |
| @@ -48,7 +46,7 @@ index e026b29478..815e56ef68 100644 | |||
| 48 | /* We want to set GLOB_ALTDIRFUNC ourselves, don't allow it to be set. */ | 46 | /* We want to set GLOB_ALTDIRFUNC ourselves, don't allow it to be set. */ |
| 49 | assert(!(flags & GLOB_ALTDIRFUNC)); | 47 | assert(!(flags & GLOB_ALTDIRFUNC)); |
| 50 | 48 | ||
| 51 | @@ -32,9 +39,14 @@ int safe_glob(const char *path, int flags, glob_t *pglob) { | 49 | @@ -32,9 +39,14 @@ int safe_glob(const char *path, int flag |
| 52 | pglob->gl_lstat = lstat; | 50 | pglob->gl_lstat = lstat; |
| 53 | if (!pglob->gl_stat) | 51 | if (!pglob->gl_stat) |
| 54 | pglob->gl_stat = stat; | 52 | pglob->gl_stat = stat; |
| @@ -63,12 +61,10 @@ index e026b29478..815e56ef68 100644 | |||
| 63 | if (k == GLOB_NOMATCH) | 61 | if (k == GLOB_NOMATCH) |
| 64 | return -ENOENT; | 62 | return -ENOENT; |
| 65 | if (k == GLOB_NOSPACE) | 63 | if (k == GLOB_NOSPACE) |
| 66 | diff --git a/src/test/test-glob-util.c b/src/test/test-glob-util.c | ||
| 67 | index 50b4924679..09c0a20aee 100644 | ||
| 68 | --- a/src/test/test-glob-util.c | 64 | --- a/src/test/test-glob-util.c |
| 69 | +++ b/src/test/test-glob-util.c | 65 | +++ b/src/test/test-glob-util.c |
| 70 | @@ -12,6 +12,12 @@ | 66 | @@ -13,6 +13,12 @@ |
| 71 | #include "rm-rf.h" | 67 | #include "tests.h" |
| 72 | #include "tmpfile-util.h" | 68 | #include "tmpfile-util.h" |
| 73 | 69 | ||
| 74 | +/* Don't fail if the standard library | 70 | +/* Don't fail if the standard library |
| @@ -77,10 +73,10 @@ index 50b4924679..09c0a20aee 100644 | |||
| 77 | +#define GLOB_BRACE 0 | 73 | +#define GLOB_BRACE 0 |
| 78 | +#endif | 74 | +#endif |
| 79 | + | 75 | + |
| 80 | static void test_glob_exists(void) { | 76 | TEST(glob_exists) { |
| 81 | log_info("/* %s */", __func__); | 77 | char name[] = "/tmp/test-glob_exists.XXXXXX"; |
| 82 | 78 | int fd = -1; | |
| 83 | @@ -41,11 +47,13 @@ static void test_glob_no_dot(void) { | 79 | @@ -40,11 +46,13 @@ TEST(glob_no_dot) { |
| 84 | const char *fn; | 80 | const char *fn; |
| 85 | 81 | ||
| 86 | _cleanup_globfree_ glob_t g = { | 82 | _cleanup_globfree_ glob_t g = { |
| @@ -94,7 +90,7 @@ index 50b4924679..09c0a20aee 100644 | |||
| 94 | }; | 90 | }; |
| 95 | 91 | ||
| 96 | int r; | 92 | int r; |
| 97 | @@ -55,11 +63,19 @@ static void test_glob_no_dot(void) { | 93 | @@ -52,11 +60,19 @@ TEST(glob_no_dot) { |
| 98 | assert_se(mkdtemp(template)); | 94 | assert_se(mkdtemp(template)); |
| 99 | 95 | ||
| 100 | fn = strjoina(template, "/*"); | 96 | fn = strjoina(template, "/*"); |
| @@ -114,11 +110,9 @@ index 50b4924679..09c0a20aee 100644 | |||
| 114 | assert_se(r == GLOB_NOMATCH); | 110 | assert_se(r == GLOB_NOMATCH); |
| 115 | 111 | ||
| 116 | (void) rm_rf(template, REMOVE_ROOT|REMOVE_PHYSICAL); | 112 | (void) rm_rf(template, REMOVE_ROOT|REMOVE_PHYSICAL); |
| 117 | diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c | ||
| 118 | index 7e85c50634..145c48a685 100644 | ||
| 119 | --- a/src/tmpfiles/tmpfiles.c | 113 | --- a/src/tmpfiles/tmpfiles.c |
| 120 | +++ b/src/tmpfiles/tmpfiles.c | 114 | +++ b/src/tmpfiles/tmpfiles.c |
| 121 | @@ -66,6 +66,12 @@ | 115 | @@ -67,6 +67,12 @@ |
| 122 | #include "umask-util.h" | 116 | #include "umask-util.h" |
| 123 | #include "user-util.h" | 117 | #include "user-util.h" |
| 124 | 118 | ||
| @@ -131,7 +125,7 @@ index 7e85c50634..145c48a685 100644 | |||
| 131 | /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates | 125 | /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates |
| 132 | * them in the file system. This is intended to be used to create | 126 | * them in the file system. This is intended to be used to create |
| 133 | * properly owned directories beneath /tmp, /var/tmp, /run, which are | 127 | * properly owned directories beneath /tmp, /var/tmp, /run, which are |
| 134 | @@ -1990,7 +1996,9 @@ finish: | 128 | @@ -1961,7 +1967,9 @@ finish: |
| 135 | 129 | ||
| 136 | static int glob_item(Item *i, action_t action) { | 130 | static int glob_item(Item *i, action_t action) { |
| 137 | _cleanup_globfree_ glob_t g = { | 131 | _cleanup_globfree_ glob_t g = { |
| @@ -141,7 +135,7 @@ index 7e85c50634..145c48a685 100644 | |||
| 141 | }; | 135 | }; |
| 142 | int r = 0, k; | 136 | int r = 0, k; |
| 143 | char **fn; | 137 | char **fn; |
| 144 | @@ -2010,7 +2018,9 @@ static int glob_item(Item *i, action_t action) { | 138 | @@ -1981,7 +1989,9 @@ static int glob_item(Item *i, action_t a |
| 145 | 139 | ||
| 146 | static int glob_item_recursively(Item *i, fdaction_t action) { | 140 | static int glob_item_recursively(Item *i, fdaction_t action) { |
| 147 | _cleanup_globfree_ glob_t g = { | 141 | _cleanup_globfree_ glob_t g = { |
diff --git a/meta/recipes-core/systemd/systemd/0008-add-missing-FTW_-macros-for-musl.patch b/meta/recipes-core/systemd/systemd/0008-add-missing-FTW_-macros-for-musl.patch index c613581ef9..57e18a5808 100644 --- a/meta/recipes-core/systemd/systemd/0008-add-missing-FTW_-macros-for-musl.patch +++ b/meta/recipes-core/systemd/systemd/0008-add-missing-FTW_-macros-for-musl.patch | |||
| @@ -16,11 +16,9 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | |||
| 16 | src/shared/mount-setup.c | 1 + | 16 | src/shared/mount-setup.c | 1 + |
| 17 | 2 files changed, 21 insertions(+) | 17 | 2 files changed, 21 insertions(+) |
| 18 | 18 | ||
| 19 | diff --git a/src/basic/missing_type.h b/src/basic/missing_type.h | ||
| 20 | index aeaf6ad5ec..3df1084ef2 100644 | ||
| 21 | --- a/src/basic/missing_type.h | 19 | --- a/src/basic/missing_type.h |
| 22 | +++ b/src/basic/missing_type.h | 20 | +++ b/src/basic/missing_type.h |
| 23 | @@ -19,3 +19,23 @@ typedef int (*comparison_fn_t)(const void *, const void *); | 21 | @@ -19,3 +19,23 @@ typedef int (*comparison_fn_t)(const voi |
| 24 | #define __COMPAR_FN_T | 22 | #define __COMPAR_FN_T |
| 25 | typedef int (*__compar_fn_t)(const void *, const void *); | 23 | typedef int (*__compar_fn_t)(const void *, const void *); |
| 26 | #endif | 24 | #endif |
| @@ -44,8 +42,6 @@ index aeaf6ad5ec..3df1084ef2 100644 | |||
| 44 | +#ifndef FTW_SKIP_SIBLINGS | 42 | +#ifndef FTW_SKIP_SIBLINGS |
| 45 | +#define FTW_SKIP_SIBLINGS 3 | 43 | +#define FTW_SKIP_SIBLINGS 3 |
| 46 | +#endif | 44 | +#endif |
| 47 | diff --git a/src/shared/mount-setup.c b/src/shared/mount-setup.c | ||
| 48 | index ef3527e9a7..c1cab40eb8 100644 | ||
| 49 | --- a/src/shared/mount-setup.c | 45 | --- a/src/shared/mount-setup.c |
| 50 | +++ b/src/shared/mount-setup.c | 46 | +++ b/src/shared/mount-setup.c |
| 51 | @@ -32,6 +32,7 @@ | 47 | @@ -32,6 +32,7 @@ |
| @@ -56,3 +52,13 @@ index ef3527e9a7..c1cab40eb8 100644 | |||
| 56 | 52 | ||
| 57 | typedef enum MountMode { | 53 | typedef enum MountMode { |
| 58 | MNT_NONE = 0, | 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/recipes-core/systemd/systemd/0010-Use-uintmax_t-for-handling-rlim_t.patch b/meta/recipes-core/systemd/systemd/0010-Use-uintmax_t-for-handling-rlim_t.patch index ff981b8c74..029f413aa8 100644 --- a/meta/recipes-core/systemd/systemd/0010-Use-uintmax_t-for-handling-rlim_t.patch +++ b/meta/recipes-core/systemd/systemd/0010-Use-uintmax_t-for-handling-rlim_t.patch | |||
| @@ -27,12 +27,10 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | |||
| 27 | src/core/execute.c | 4 ++-- | 27 | src/core/execute.c | 4 ++-- |
| 28 | 3 files changed, 9 insertions(+), 15 deletions(-) | 28 | 3 files changed, 9 insertions(+), 15 deletions(-) |
| 29 | 29 | ||
| 30 | diff --git a/src/basic/format-util.h b/src/basic/format-util.h | ||
| 31 | index b7e18768e3..3195ab205d 100644 | ||
| 32 | --- a/src/basic/format-util.h | 30 | --- a/src/basic/format-util.h |
| 33 | +++ b/src/basic/format-util.h | 31 | +++ b/src/basic/format-util.h |
| 34 | @@ -32,13 +32,7 @@ assert_cc(sizeof(gid_t) == sizeof(uint32_t)); | 32 | @@ -34,13 +34,7 @@ assert_cc(sizeof(gid_t) == sizeof(uint32 |
| 35 | # define PRI_TIMEX "li" | 33 | # error Unknown timex member size |
| 36 | #endif | 34 | #endif |
| 37 | 35 | ||
| 38 | -#if SIZEOF_RLIM_T == 8 | 36 | -#if SIZEOF_RLIM_T == 8 |
| @@ -46,38 +44,36 @@ index b7e18768e3..3195ab205d 100644 | |||
| 46 | 44 | ||
| 47 | #if SIZEOF_DEV_T == 8 | 45 | #if SIZEOF_DEV_T == 8 |
| 48 | # define DEV_FMT "%" PRIu64 | 46 | # define DEV_FMT "%" PRIu64 |
| 49 | diff --git a/src/basic/rlimit-util.c b/src/basic/rlimit-util.c | ||
| 50 | index 23d108d5df..3e6fb438d7 100644 | ||
| 51 | --- a/src/basic/rlimit-util.c | 47 | --- a/src/basic/rlimit-util.c |
| 52 | +++ b/src/basic/rlimit-util.c | 48 | +++ b/src/basic/rlimit-util.c |
| 53 | @@ -43,7 +43,7 @@ int setrlimit_closest(int resource, const struct rlimit *rlim) { | 49 | @@ -44,7 +44,7 @@ int setrlimit_closest(int resource, cons |
| 54 | fixed.rlim_max == highest.rlim_max) | 50 | fixed.rlim_max == highest.rlim_max) |
| 55 | return 0; | 51 | return 0; |
| 56 | 52 | ||
| 57 | - log_debug("Failed at setting rlimit " RLIM_FMT " for resource RLIMIT_%s. Will attempt setting value " RLIM_FMT " instead.", rlim->rlim_max, rlimit_to_string(resource), fixed.rlim_max); | 53 | - log_debug("Failed at setting rlimit " RLIM_FMT " for resource RLIMIT_%s. Will attempt setting value " RLIM_FMT " instead.", rlim->rlim_max, rlimit_to_string(resource), fixed.rlim_max); |
| 58 | + log_debug("Failed at setting rlimit " RLIM_FMT " for resource RLIMIT_%s. Will attempt setting value " RLIM_FMT " instead.", (uintmax_t)rlim->rlim_max, rlimit_to_string(resource), (uintmax_t)fixed.rlim_max); | 54 | + log_debug("Failed at setting rlimit " RLIM_FMT " for resource RLIMIT_%s. Will attempt setting value " RLIM_FMT " instead.", (uintmax_t)rlim->rlim_max, rlimit_to_string(resource), (uintmax_t)fixed.rlim_max); |
| 59 | 55 | ||
| 60 | if (setrlimit(resource, &fixed) < 0) | 56 | return RET_NERRNO(setrlimit(resource, &fixed)); |
| 61 | return -errno; | 57 | } |
| 62 | @@ -308,13 +308,13 @@ int rlimit_format(const struct rlimit *rl, char **ret) { | 58 | @@ -307,13 +307,13 @@ int rlimit_format(const struct rlimit *r |
| 63 | if (rl->rlim_cur >= RLIM_INFINITY && rl->rlim_max >= RLIM_INFINITY) | 59 | if (rl->rlim_cur >= RLIM_INFINITY && rl->rlim_max >= RLIM_INFINITY) |
| 64 | s = strdup("infinity"); | 60 | r = free_and_strdup(&s, "infinity"); |
| 65 | else if (rl->rlim_cur >= RLIM_INFINITY) | 61 | else if (rl->rlim_cur >= RLIM_INFINITY) |
| 66 | - (void) asprintf(&s, "infinity:" RLIM_FMT, rl->rlim_max); | 62 | - r = asprintf(&s, "infinity:" RLIM_FMT, rl->rlim_max); |
| 67 | + (void) asprintf(&s, "infinity:" RLIM_FMT, (uintmax_t)rl->rlim_max); | 63 | + r = asprintf(&s, "infinity:" RLIM_FMT, (uintmax_t)rl->rlim_max); |
| 68 | else if (rl->rlim_max >= RLIM_INFINITY) | 64 | else if (rl->rlim_max >= RLIM_INFINITY) |
| 69 | - (void) asprintf(&s, RLIM_FMT ":infinity", rl->rlim_cur); | 65 | - r = asprintf(&s, RLIM_FMT ":infinity", rl->rlim_cur); |
| 70 | + (void) asprintf(&s, RLIM_FMT ":infinity", (uintmax_t)rl->rlim_cur); | 66 | + r = asprintf(&s, RLIM_FMT ":infinity", (uintmax_t)rl->rlim_cur); |
| 71 | else if (rl->rlim_cur == rl->rlim_max) | 67 | else if (rl->rlim_cur == rl->rlim_max) |
| 72 | - (void) asprintf(&s, RLIM_FMT, rl->rlim_cur); | 68 | - r = asprintf(&s, RLIM_FMT, rl->rlim_cur); |
| 73 | + (void) asprintf(&s, RLIM_FMT, (uintmax_t)rl->rlim_cur); | 69 | + r = asprintf(&s, RLIM_FMT, (uintmax_t)rl->rlim_cur); |
| 74 | else | 70 | else |
| 75 | - (void) asprintf(&s, RLIM_FMT ":" RLIM_FMT, rl->rlim_cur, rl->rlim_max); | 71 | - r = asprintf(&s, RLIM_FMT ":" RLIM_FMT, rl->rlim_cur, rl->rlim_max); |
| 76 | + (void) asprintf(&s, RLIM_FMT ":" RLIM_FMT, (uintmax_t)rl->rlim_cur, (uintmax_t)rl->rlim_max); | 72 | + r = asprintf(&s, RLIM_FMT ":" RLIM_FMT, (uintmax_t)rl->rlim_cur, (uintmax_t)rl->rlim_max); |
| 77 | 73 | if (r < 0) | |
| 78 | if (!s) | ||
| 79 | return -ENOMEM; | 74 | return -ENOMEM; |
| 80 | @@ -405,7 +405,7 @@ int rlimit_nofile_safe(void) { | 75 | |
| 76 | @@ -403,7 +403,7 @@ int rlimit_nofile_safe(void) { | ||
| 81 | 77 | ||
| 82 | rl.rlim_cur = FD_SETSIZE; | 78 | rl.rlim_cur = FD_SETSIZE; |
| 83 | if (setrlimit(RLIMIT_NOFILE, &rl) < 0) | 79 | if (setrlimit(RLIMIT_NOFILE, &rl) < 0) |
| @@ -86,11 +82,9 @@ index 23d108d5df..3e6fb438d7 100644 | |||
| 86 | 82 | ||
| 87 | return 1; | 83 | return 1; |
| 88 | } | 84 | } |
| 89 | diff --git a/src/core/execute.c b/src/core/execute.c | ||
| 90 | index 515b2fe748..7693f2d9a0 100644 | ||
| 91 | --- a/src/core/execute.c | 85 | --- a/src/core/execute.c |
| 92 | +++ b/src/core/execute.c | 86 | +++ b/src/core/execute.c |
| 93 | @@ -5395,9 +5395,9 @@ void exec_context_dump(const ExecContext *c, FILE* f, const char *prefix) { | 87 | @@ -5639,9 +5639,9 @@ void exec_context_dump(const ExecContext |
| 94 | for (unsigned i = 0; i < RLIM_NLIMITS; i++) | 88 | for (unsigned i = 0; i < RLIM_NLIMITS; i++) |
| 95 | if (c->rlimit[i]) { | 89 | if (c->rlimit[i]) { |
| 96 | fprintf(f, "%sLimit%s: " RLIM_FMT "\n", | 90 | fprintf(f, "%sLimit%s: " RLIM_FMT "\n", |
diff --git a/meta/recipes-core/systemd/systemd/0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch b/meta/recipes-core/systemd/systemd/0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch index 0ee871c92d..327084bae9 100644 --- a/meta/recipes-core/systemd/systemd/0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch +++ b/meta/recipes-core/systemd/systemd/0011-test-sizeof.c-Disable-tests-for-missing-typedefs-in-.patch | |||
| @@ -12,8 +12,6 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | |||
| 12 | src/test/test-sizeof.c | 4 ++++ | 12 | src/test/test-sizeof.c | 4 ++++ |
| 13 | 1 file changed, 4 insertions(+) | 13 | 1 file changed, 4 insertions(+) |
| 14 | 14 | ||
| 15 | diff --git a/src/test/test-sizeof.c b/src/test/test-sizeof.c | ||
| 16 | index e36bee4e8f..4403c0aa52 100644 | ||
| 17 | --- a/src/test/test-sizeof.c | 15 | --- a/src/test/test-sizeof.c |
| 18 | +++ b/src/test/test-sizeof.c | 16 | +++ b/src/test/test-sizeof.c |
| 19 | @@ -55,8 +55,10 @@ int main(void) { | 17 | @@ -55,8 +55,10 @@ int main(void) { |
| @@ -24,10 +22,10 @@ index e36bee4e8f..4403c0aa52 100644 | |||
| 24 | info(__syscall_ulong_t); | 22 | info(__syscall_ulong_t); |
| 25 | info(__syscall_slong_t); | 23 | info(__syscall_slong_t); |
| 26 | +#endif | 24 | +#endif |
| 25 | info(intmax_t); | ||
| 26 | info(uintmax_t); | ||
| 27 | 27 | ||
| 28 | info(float); | 28 | @@ -76,7 +78,9 @@ int main(void) { |
| 29 | info(double); | ||
| 30 | @@ -74,7 +76,9 @@ int main(void) { | ||
| 31 | info(ssize_t); | 29 | info(ssize_t); |
| 32 | info(time_t); | 30 | info(time_t); |
| 33 | info(usec_t); | 31 | info(usec_t); |
diff --git a/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch b/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch index 12a92b8739..0026a7b72a 100644 --- a/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch +++ b/meta/recipes-core/systemd/systemd/0012-don-t-pass-AT_SYMLINK_NOFOLLOW-flag-to-faccessat.patch | |||
| @@ -31,16 +31,12 @@ Signed-off-by: Andre McCurdy <armccurdy@gmail.com> | |||
| 31 | src/shared/base-filesystem.c | 6 +++--- | 31 | src/shared/base-filesystem.c | 6 +++--- |
| 32 | 2 files changed, 24 insertions(+), 5 deletions(-) | 32 | 2 files changed, 24 insertions(+), 5 deletions(-) |
| 33 | 33 | ||
| 34 | diff --git a/src/basic/fs-util.h b/src/basic/fs-util.h | ||
| 35 | index 7f15b558ca..4263298cad 100644 | ||
| 36 | --- a/src/basic/fs-util.h | 34 | --- a/src/basic/fs-util.h |
| 37 | +++ b/src/basic/fs-util.h | 35 | +++ b/src/basic/fs-util.h |
| 38 | @@ -47,8 +47,27 @@ int futimens_opath(int fd, const struct timespec ts[2]); | 36 | @@ -46,8 +46,27 @@ int futimens_opath(int fd, const struct |
| 39 | int fd_warn_permissions(const char *path, int fd); | 37 | int fd_warn_permissions(const char *path, int fd); |
| 40 | int stat_warn_permissions(const char *path, const struct stat *st); | 38 | int stat_warn_permissions(const char *path, const struct stat *st); |
| 41 | 39 | ||
| 42 | -#define laccess(path, mode) \ | ||
| 43 | - (faccessat(AT_FDCWD, (path), (mode), AT_SYMLINK_NOFOLLOW) < 0 ? -errno : 0) | ||
| 44 | +/* | 40 | +/* |
| 45 | + Avoid using AT_SYMLINK_NOFOLLOW flag. It doesn't seem like the right thing to | 41 | + Avoid using AT_SYMLINK_NOFOLLOW flag. It doesn't seem like the right thing to |
| 46 | + do and it's not portable (not supported by musl). See: | 42 | + do and it's not portable (not supported by musl). See: |
| @@ -60,16 +56,15 @@ index 7f15b558ca..4263298cad 100644 | |||
| 60 | + or why it needs to return success for broken symlinks. Maybe just historical | 56 | + or why it needs to return success for broken symlinks. Maybe just historical |
| 61 | + and not actually necessary or desired behaviour? | 57 | + and not actually necessary or desired behaviour? |
| 62 | +*/ | 58 | +*/ |
| 63 | + | 59 | #define laccess(path, mode) \ |
| 64 | +#define laccess(path, mode) faccessat(AT_FDCWD, (path), (mode), 0) | 60 | - RET_NERRNO(faccessat(AT_FDCWD, (path), (mode), AT_SYMLINK_NOFOLLOW)) |
| 61 | + RET_NERRNO(faccessat(AT_FDCWD, (path), (mode), 0)) | ||
| 65 | 62 | ||
| 66 | int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gid, mode_t mode); | 63 | int touch_file(const char *path, bool parents, usec_t stamp, uid_t uid, gid_t gid, mode_t mode); |
| 67 | int touch(const char *path); | 64 | int touch(const char *path); |
| 68 | diff --git a/src/shared/base-filesystem.c b/src/shared/base-filesystem.c | ||
| 69 | index 016eb7b82a..b1967f9f2f 100644 | ||
| 70 | --- a/src/shared/base-filesystem.c | 65 | --- a/src/shared/base-filesystem.c |
| 71 | +++ b/src/shared/base-filesystem.c | 66 | +++ b/src/shared/base-filesystem.c |
| 72 | @@ -53,7 +53,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) { | 67 | @@ -117,7 +117,7 @@ int base_filesystem_create(const char *r |
| 73 | return log_error_errno(errno, "Failed to open root file system: %m"); | 68 | return log_error_errno(errno, "Failed to open root file system: %m"); |
| 74 | 69 | ||
| 75 | for (size_t i = 0; i < ELEMENTSOF(table); i++) { | 70 | for (size_t i = 0; i < ELEMENTSOF(table); i++) { |
| @@ -78,7 +73,7 @@ index 016eb7b82a..b1967f9f2f 100644 | |||
| 78 | continue; | 73 | continue; |
| 79 | 74 | ||
| 80 | if (table[i].target) { | 75 | if (table[i].target) { |
| 81 | @@ -61,7 +61,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) { | 76 | @@ -125,7 +125,7 @@ int base_filesystem_create(const char *r |
| 82 | 77 | ||
| 83 | /* check if one of the targets exists */ | 78 | /* check if one of the targets exists */ |
| 84 | NULSTR_FOREACH(s, table[i].target) { | 79 | NULSTR_FOREACH(s, table[i].target) { |
| @@ -87,7 +82,7 @@ index 016eb7b82a..b1967f9f2f 100644 | |||
| 87 | continue; | 82 | continue; |
| 88 | 83 | ||
| 89 | /* check if a specific file exists at the target path */ | 84 | /* check if a specific file exists at the target path */ |
| 90 | @@ -72,7 +72,7 @@ int base_filesystem_create(const char *root, uid_t uid, gid_t gid) { | 85 | @@ -136,7 +136,7 @@ int base_filesystem_create(const char *r |
| 91 | if (!p) | 86 | if (!p) |
| 92 | return log_oom(); | 87 | return log_oom(); |
| 93 | 88 | ||
diff --git a/meta/recipes-core/systemd/systemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch b/meta/recipes-core/systemd/systemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch index bd7a0c4e8e..612a535d3c 100644 --- a/meta/recipes-core/systemd/systemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch +++ b/meta/recipes-core/systemd/systemd/0013-Define-glibc-compatible-basename-for-non-glibc-syste.patch | |||
| @@ -14,11 +14,9 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
| 14 | src/machine/machine-dbus.c | 5 +++++ | 14 | src/machine/machine-dbus.c | 5 +++++ |
| 15 | 1 file changed, 5 insertions(+) | 15 | 1 file changed, 5 insertions(+) |
| 16 | 16 | ||
| 17 | diff --git a/src/machine/machine-dbus.c b/src/machine/machine-dbus.c | ||
| 18 | index fc22e51409..1fed07b941 100644 | ||
| 19 | --- a/src/machine/machine-dbus.c | 17 | --- a/src/machine/machine-dbus.c |
| 20 | +++ b/src/machine/machine-dbus.c | 18 | +++ b/src/machine/machine-dbus.c |
| 21 | @@ -11,6 +11,11 @@ | 19 | @@ -10,6 +10,11 @@ |
| 22 | #include <libgen.h> | 20 | #include <libgen.h> |
| 23 | #undef basename | 21 | #undef basename |
| 24 | 22 | ||
diff --git a/meta/recipes-core/systemd/systemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch b/meta/recipes-core/systemd/systemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch index 7933b9e76e..baf4903803 100644 --- a/meta/recipes-core/systemd/systemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch +++ b/meta/recipes-core/systemd/systemd/0014-Do-not-disable-buffering-when-writing-to-oom_score_a.patch | |||
| @@ -24,16 +24,14 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
| 24 | src/basic/process-util.c | 2 +- | 24 | src/basic/process-util.c | 2 +- |
| 25 | 1 file changed, 1 insertion(+), 1 deletion(-) | 25 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 26 | 26 | ||
| 27 | diff --git a/src/basic/process-util.c b/src/basic/process-util.c | ||
| 28 | index 2d06f9f60a..f86bd0b7dc 100644 | ||
| 29 | --- a/src/basic/process-util.c | 27 | --- a/src/basic/process-util.c |
| 30 | +++ b/src/basic/process-util.c | 28 | +++ b/src/basic/process-util.c |
| 31 | @@ -1606,7 +1606,7 @@ int set_oom_score_adjust(int value) { | 29 | @@ -1489,7 +1489,7 @@ int set_oom_score_adjust(int value) { |
| 32 | sprintf(t, "%i", value); | 30 | xsprintf(t, "%i", value); |
| 33 | 31 | ||
| 34 | return write_string_file("/proc/self/oom_score_adj", t, | 32 | return write_string_file("/proc/self/oom_score_adj", t, |
| 35 | - WRITE_STRING_FILE_VERIFY_ON_FAILURE|WRITE_STRING_FILE_DISABLE_BUFFER); | 33 | - WRITE_STRING_FILE_VERIFY_ON_FAILURE|WRITE_STRING_FILE_DISABLE_BUFFER); |
| 36 | + WRITE_STRING_FILE_VERIFY_ON_FAILURE); | 34 | + WRITE_STRING_FILE_VERIFY_ON_FAILURE); |
| 37 | } | 35 | } |
| 38 | 36 | ||
| 39 | int pidfd_get_pid(int fd, pid_t *ret) { | 37 | int get_oom_score_adjust(int *ret) { |
diff --git a/meta/recipes-core/systemd/systemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch b/meta/recipes-core/systemd/systemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch index 0b0d2a6431..878914b307 100644 --- a/meta/recipes-core/systemd/systemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch +++ b/meta/recipes-core/systemd/systemd/0015-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch | |||
| @@ -24,11 +24,9 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | |||
| 24 | src/libsystemd/sd-journal/journal-send.c | 5 +++++ | 24 | src/libsystemd/sd-journal/journal-send.c | 5 +++++ |
| 25 | 2 files changed, 10 insertions(+) | 25 | 2 files changed, 10 insertions(+) |
| 26 | 26 | ||
| 27 | diff --git a/src/libsystemd/sd-bus/bus-error.c b/src/libsystemd/sd-bus/bus-error.c | ||
| 28 | index 7483b46a11..c49be29e46 100644 | ||
| 29 | --- a/src/libsystemd/sd-bus/bus-error.c | 27 | --- a/src/libsystemd/sd-bus/bus-error.c |
| 30 | +++ b/src/libsystemd/sd-bus/bus-error.c | 28 | +++ b/src/libsystemd/sd-bus/bus-error.c |
| 31 | @@ -404,7 +404,12 @@ static void bus_error_strerror(sd_bus_error *e, int error) { | 29 | @@ -409,7 +409,12 @@ static void bus_error_strerror(sd_bus_er |
| 32 | return; | 30 | return; |
| 33 | 31 | ||
| 34 | errno = 0; | 32 | errno = 0; |
| @@ -41,11 +39,9 @@ index 7483b46a11..c49be29e46 100644 | |||
| 41 | if (errno == ERANGE || strlen(x) >= k - 1) { | 39 | if (errno == ERANGE || strlen(x) >= k - 1) { |
| 42 | free(m); | 40 | free(m); |
| 43 | k *= 2; | 41 | k *= 2; |
| 44 | diff --git a/src/libsystemd/sd-journal/journal-send.c b/src/libsystemd/sd-journal/journal-send.c | ||
| 45 | index e8e6ad555b..8ca5271d02 100644 | ||
| 46 | --- a/src/libsystemd/sd-journal/journal-send.c | 42 | --- a/src/libsystemd/sd-journal/journal-send.c |
| 47 | +++ b/src/libsystemd/sd-journal/journal-send.c | 43 | +++ b/src/libsystemd/sd-journal/journal-send.c |
| 48 | @@ -348,7 +348,12 @@ static int fill_iovec_perror_and_send(const char *message, int skip, struct iove | 44 | @@ -348,7 +348,12 @@ static int fill_iovec_perror_and_send(co |
| 49 | char* j; | 45 | char* j; |
| 50 | 46 | ||
| 51 | errno = 0; | 47 | errno = 0; |
diff --git a/meta/recipes-core/systemd/systemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch b/meta/recipes-core/systemd/systemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch index 2d272ed3e8..1ba5c1292b 100644 --- a/meta/recipes-core/systemd/systemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch +++ b/meta/recipes-core/systemd/systemd/0020-Fix-incompatible-pointer-type-struct-sockaddr_un.patch | |||
| @@ -23,11 +23,9 @@ Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> | |||
| 23 | src/nspawn/nspawn.c | 2 +- | 23 | src/nspawn/nspawn.c | 2 +- |
| 24 | 1 file changed, 1 insertion(+), 1 deletion(-) | 24 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 25 | 25 | ||
| 26 | diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c | ||
| 27 | index 575b9da447..ff08ed23cc 100644 | ||
| 28 | --- a/src/nspawn/nspawn.c | 26 | --- a/src/nspawn/nspawn.c |
| 29 | +++ b/src/nspawn/nspawn.c | 27 | +++ b/src/nspawn/nspawn.c |
| 30 | @@ -5354,7 +5354,7 @@ static int cant_be_in_netns(void) { | 28 | @@ -5389,7 +5389,7 @@ static int cant_be_in_netns(void) { |
| 31 | if (fd < 0) | 29 | if (fd < 0) |
| 32 | return log_error_errno(errno, "Failed to allocate udev control socket: %m"); | 30 | return log_error_errno(errno, "Failed to allocate udev control socket: %m"); |
| 33 | 31 | ||
diff --git a/meta/recipes-core/systemd/systemd/0021-test-json.c-define-M_PIl.patch b/meta/recipes-core/systemd/systemd/0021-test-json.c-define-M_PIl.patch index 3fe5aeab13..dfab8fbbdf 100644 --- a/meta/recipes-core/systemd/systemd/0021-test-json.c-define-M_PIl.patch +++ b/meta/recipes-core/systemd/systemd/0021-test-json.c-define-M_PIl.patch | |||
| @@ -14,11 +14,9 @@ Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | |||
| 14 | src/test/test-json.c | 4 ++++ | 14 | src/test/test-json.c | 4 ++++ |
| 15 | 1 file changed, 4 insertions(+) | 15 | 1 file changed, 4 insertions(+) |
| 16 | 16 | ||
| 17 | diff --git a/src/test/test-json.c b/src/test/test-json.c | ||
| 18 | index 1d4b11945e..572c8cf9d0 100644 | ||
| 19 | --- a/src/test/test-json.c | 17 | --- a/src/test/test-json.c |
| 20 | +++ b/src/test/test-json.c | 18 | +++ b/src/test/test-json.c |
| 21 | @@ -13,6 +13,10 @@ | 19 | @@ -14,6 +14,10 @@ |
| 22 | #include "tests.h" | 20 | #include "tests.h" |
| 23 | #include "util.h" | 21 | #include "util.h" |
| 24 | 22 | ||
| @@ -26,6 +24,6 @@ index 1d4b11945e..572c8cf9d0 100644 | |||
| 26 | +#define M_PIl 3.141592653589793238462643383279502884L | 24 | +#define M_PIl 3.141592653589793238462643383279502884L |
| 27 | +#endif | 25 | +#endif |
| 28 | + | 26 | + |
| 29 | static void test_tokenizer(const char *data, ...) { | 27 | static void test_tokenizer_one(const char *data, ...) { |
| 30 | unsigned line = 0, column = 0; | 28 | unsigned line = 0, column = 0; |
| 31 | void *state = NULL; | 29 | void *state = NULL; |
diff --git a/meta/recipes-core/systemd/systemd/0022-do-not-disable-buffer-in-writing-files.patch b/meta/recipes-core/systemd/systemd/0022-do-not-disable-buffer-in-writing-files.patch index 4df35d81d1..d389e1d9f9 100644 --- a/meta/recipes-core/systemd/systemd/0022-do-not-disable-buffer-in-writing-files.patch +++ b/meta/recipes-core/systemd/systemd/0022-do-not-disable-buffer-in-writing-files.patch | |||
| @@ -38,11 +38,18 @@ Signed-off-by: Scott Murray <scott.murray@konsulko.com> | |||
| 38 | src/vconsole/vconsole-setup.c | 2 +- | 38 | src/vconsole/vconsole-setup.c | 2 +- |
| 39 | 16 files changed, 34 insertions(+), 34 deletions(-) | 39 | 16 files changed, 34 insertions(+), 34 deletions(-) |
| 40 | 40 | ||
| 41 | diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c | ||
| 42 | index c9efd862a2..b3708ea925 100644 | ||
| 43 | --- a/src/basic/cgroup-util.c | 41 | --- a/src/basic/cgroup-util.c |
| 44 | +++ b/src/basic/cgroup-util.c | 42 | +++ b/src/basic/cgroup-util.c |
| 45 | @@ -766,7 +766,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { | 43 | @@ -390,7 +390,7 @@ int cg_kill_kernel_sigkill(const char *c |
| 44 | if (r < 0) | ||
| 45 | return r; | ||
| 46 | |||
| 47 | - r = write_string_file(killfile, "1", WRITE_STRING_FILE_DISABLE_BUFFER); | ||
| 48 | + r = write_string_file(killfile, "1", 0); | ||
| 49 | if (r < 0) | ||
| 50 | return r; | ||
| 51 | |||
| 52 | @@ -803,7 +803,7 @@ int cg_install_release_agent(const char | ||
| 46 | 53 | ||
| 47 | sc = strstrip(contents); | 54 | sc = strstrip(contents); |
| 48 | if (isempty(sc)) { | 55 | if (isempty(sc)) { |
| @@ -51,7 +58,7 @@ index c9efd862a2..b3708ea925 100644 | |||
| 51 | if (r < 0) | 58 | if (r < 0) |
| 52 | return r; | 59 | return r; |
| 53 | } else if (!path_equal(sc, agent)) | 60 | } else if (!path_equal(sc, agent)) |
| 54 | @@ -784,7 +784,7 @@ int cg_install_release_agent(const char *controller, const char *agent) { | 61 | @@ -821,7 +821,7 @@ int cg_install_release_agent(const char |
| 55 | 62 | ||
| 56 | sc = strstrip(contents); | 63 | sc = strstrip(contents); |
| 57 | if (streq(sc, "0")) { | 64 | if (streq(sc, "0")) { |
| @@ -60,7 +67,7 @@ index c9efd862a2..b3708ea925 100644 | |||
| 60 | if (r < 0) | 67 | if (r < 0) |
| 61 | return r; | 68 | return r; |
| 62 | 69 | ||
| 63 | @@ -811,7 +811,7 @@ int cg_uninstall_release_agent(const char *controller) { | 70 | @@ -848,7 +848,7 @@ int cg_uninstall_release_agent(const cha |
| 64 | if (r < 0) | 71 | if (r < 0) |
| 65 | return r; | 72 | return r; |
| 66 | 73 | ||
| @@ -69,7 +76,7 @@ index c9efd862a2..b3708ea925 100644 | |||
| 69 | if (r < 0) | 76 | if (r < 0) |
| 70 | return r; | 77 | return r; |
| 71 | 78 | ||
| 72 | @@ -821,7 +821,7 @@ int cg_uninstall_release_agent(const char *controller) { | 79 | @@ -858,7 +858,7 @@ int cg_uninstall_release_agent(const cha |
| 73 | if (r < 0) | 80 | if (r < 0) |
| 74 | return r; | 81 | return r; |
| 75 | 82 | ||
| @@ -78,7 +85,7 @@ index c9efd862a2..b3708ea925 100644 | |||
| 78 | if (r < 0) | 85 | if (r < 0) |
| 79 | return r; | 86 | return r; |
| 80 | 87 | ||
| 81 | @@ -1651,7 +1651,7 @@ int cg_set_attribute(const char *controller, const char *path, const char *attri | 88 | @@ -1704,7 +1704,7 @@ int cg_set_attribute(const char *control |
| 82 | if (r < 0) | 89 | if (r < 0) |
| 83 | return r; | 90 | return r; |
| 84 | 91 | ||
| @@ -87,11 +94,9 @@ index c9efd862a2..b3708ea925 100644 | |||
| 87 | } | 94 | } |
| 88 | 95 | ||
| 89 | int cg_get_attribute(const char *controller, const char *path, const char *attribute, char **ret) { | 96 | int cg_get_attribute(const char *controller, const char *path, const char *attribute, char **ret) { |
| 90 | diff --git a/src/basic/procfs-util.c b/src/basic/procfs-util.c | ||
| 91 | index 8c57094225..0cf6ec752b 100644 | ||
| 92 | --- a/src/basic/procfs-util.c | 97 | --- a/src/basic/procfs-util.c |
| 93 | +++ b/src/basic/procfs-util.c | 98 | +++ b/src/basic/procfs-util.c |
| 94 | @@ -86,13 +86,13 @@ int procfs_tasks_set_limit(uint64_t limit) { | 99 | @@ -64,13 +64,13 @@ int procfs_tasks_set_limit(uint64_t limi |
| 95 | * decrease it, as threads-max is the much more relevant sysctl. */ | 100 | * decrease it, as threads-max is the much more relevant sysctl. */ |
| 96 | if (limit > pid_max-1) { | 101 | if (limit > pid_max-1) { |
| 97 | sprintf(buffer, "%" PRIu64, limit+1); /* Add one, since PID 0 is not a valid PID */ | 102 | sprintf(buffer, "%" PRIu64, limit+1); /* Add one, since PID 0 is not a valid PID */ |
| @@ -107,24 +112,20 @@ index 8c57094225..0cf6ec752b 100644 | |||
| 107 | if (r < 0) { | 112 | if (r < 0) { |
| 108 | uint64_t threads_max; | 113 | uint64_t threads_max; |
| 109 | 114 | ||
| 110 | diff --git a/src/basic/sysctl-util.c b/src/basic/sysctl-util.c | ||
| 111 | index 8913e6ff85..29e6ec0755 100644 | ||
| 112 | --- a/src/basic/sysctl-util.c | 115 | --- a/src/basic/sysctl-util.c |
| 113 | +++ b/src/basic/sysctl-util.c | 116 | +++ b/src/basic/sysctl-util.c |
| 114 | @@ -93,7 +93,7 @@ int sysctl_write_ip_property(int af, const char *ifname, const char *property, c | 117 | @@ -58,7 +58,7 @@ int sysctl_write(const char *property, c |
| 115 | 118 | ||
| 116 | log_debug("Setting '%s' to '%s'", p, value); | 119 | log_debug("Setting '%s' to '%s'", p, value); |
| 117 | 120 | ||
| 118 | - return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_DISABLE_BUFFER); | 121 | - return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_DISABLE_BUFFER | WRITE_STRING_FILE_SUPPRESS_REDUNDANT_VIRTUAL); |
| 119 | + return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | 0); | 122 | + return write_string_file(p, value, WRITE_STRING_FILE_VERIFY_ON_FAILURE | WRITE_STRING_FILE_SUPPRESS_REDUNDANT_VIRTUAL); |
| 120 | } | 123 | } |
| 121 | 124 | ||
| 122 | int sysctl_read(const char *property, char **ret) { | 125 | int sysctl_writef(const char *property, const char *format, ...) { |
| 123 | diff --git a/src/basic/util.c b/src/basic/util.c | ||
| 124 | index 955b18bd2a..6d89c90176 100644 | ||
| 125 | --- a/src/basic/util.c | 126 | --- a/src/basic/util.c |
| 126 | +++ b/src/basic/util.c | 127 | +++ b/src/basic/util.c |
| 127 | @@ -234,7 +234,7 @@ void disable_coredumps(void) { | 128 | @@ -168,7 +168,7 @@ void disable_coredumps(void) { |
| 128 | if (detect_container() > 0) | 129 | if (detect_container() > 0) |
| 129 | return; | 130 | return; |
| 130 | 131 | ||
| @@ -133,67 +134,61 @@ index 955b18bd2a..6d89c90176 100644 | |||
| 133 | if (r < 0) | 134 | if (r < 0) |
| 134 | log_debug_errno(r, "Failed to turn off coredumps, ignoring: %m"); | 135 | log_debug_errno(r, "Failed to turn off coredumps, ignoring: %m"); |
| 135 | } | 136 | } |
| 136 | diff --git a/src/binfmt/binfmt.c b/src/binfmt/binfmt.c | ||
| 137 | index 981218f52f..436aaaddb4 100644 | ||
| 138 | --- a/src/binfmt/binfmt.c | 137 | --- a/src/binfmt/binfmt.c |
| 139 | +++ b/src/binfmt/binfmt.c | 138 | +++ b/src/binfmt/binfmt.c |
| 140 | @@ -48,7 +48,7 @@ static int delete_rule(const char *rule) { | 139 | @@ -29,7 +29,7 @@ static bool arg_unregister = false; |
| 141 | if (!fn) | ||
| 142 | return log_oom(); | ||
| 143 | 140 | ||
| 141 | static int delete_rule(const char *rulename) { | ||
| 142 | const char *fn = strjoina("/proc/sys/fs/binfmt_misc/", rulename); | ||
| 144 | - return write_string_file(fn, "-1", WRITE_STRING_FILE_DISABLE_BUFFER); | 143 | - return write_string_file(fn, "-1", WRITE_STRING_FILE_DISABLE_BUFFER); |
| 145 | + return write_string_file(fn, "-1", 0); | 144 | + return write_string_file(fn, "-1", 0); |
| 146 | } | 145 | } |
| 147 | 146 | ||
| 148 | static int apply_rule(const char *rule) { | 147 | static int apply_rule(const char *filename, unsigned line, const char *rule) { |
| 149 | @@ -56,7 +56,7 @@ static int apply_rule(const char *rule) { | 148 | @@ -59,7 +59,7 @@ static int apply_rule(const char *filena |
| 150 | 149 | if (r >= 0) | |
| 151 | (void) delete_rule(rule); | 150 | log_debug("%s:%u: Rule '%s' deleted.", filename, line, rulename); |
| 152 | 151 | ||
| 153 | - r = write_string_file("/proc/sys/fs/binfmt_misc/register", rule, WRITE_STRING_FILE_DISABLE_BUFFER); | 152 | - r = write_string_file("/proc/sys/fs/binfmt_misc/register", rule, WRITE_STRING_FILE_DISABLE_BUFFER); |
| 154 | + r = write_string_file("/proc/sys/fs/binfmt_misc/register", rule, 0); | 153 | + r = write_string_file("/proc/sys/fs/binfmt_misc/register", rule, 0); |
| 155 | if (r < 0) | 154 | if (r < 0) |
| 156 | return log_error_errno(r, "Failed to add binary format: %m"); | 155 | return log_error_errno(r, "%s:%u: Failed to add binary format '%s': %m", |
| 157 | 156 | filename, line, rulename); | |
| 158 | @@ -223,7 +223,7 @@ static int run(int argc, char *argv[]) { | 157 | @@ -226,7 +226,7 @@ static int run(int argc, char *argv[]) { |
| 159 | } | 158 | } |
| 160 | 159 | ||
| 161 | /* Flush out all rules */ | 160 | /* Flush out all rules */ |
| 162 | - (void) write_string_file("/proc/sys/fs/binfmt_misc/status", "-1", WRITE_STRING_FILE_DISABLE_BUFFER); | 161 | - r = write_string_file("/proc/sys/fs/binfmt_misc/status", "-1", WRITE_STRING_FILE_DISABLE_BUFFER); |
| 163 | + (void) write_string_file("/proc/sys/fs/binfmt_misc/status", "-1", 0); | 162 | + r = write_string_file("/proc/sys/fs/binfmt_misc/status", "-1", 0); |
| 164 | 163 | if (r < 0) | |
| 165 | STRV_FOREACH(f, files) { | 164 | log_warning_errno(r, "Failed to flush binfmt_misc rules, ignoring: %m"); |
| 166 | k = apply_file(*f, true); | 165 | else |
| 167 | diff --git a/src/core/main.c b/src/core/main.c | ||
| 168 | index c64c73883e..1ac185e946 100644 | ||
| 169 | --- a/src/core/main.c | 166 | --- a/src/core/main.c |
| 170 | +++ b/src/core/main.c | 167 | +++ b/src/core/main.c |
| 171 | @@ -1402,7 +1402,7 @@ static int bump_unix_max_dgram_qlen(void) { | 168 | @@ -1466,7 +1466,7 @@ static int bump_unix_max_dgram_qlen(void |
| 172 | if (v >= DEFAULT_UNIX_MAX_DGRAM_QLEN) | 169 | if (v >= DEFAULT_UNIX_MAX_DGRAM_QLEN) |
| 173 | return 0; | 170 | return 0; |
| 174 | 171 | ||
| 175 | - r = write_string_filef("/proc/sys/net/unix/max_dgram_qlen", WRITE_STRING_FILE_DISABLE_BUFFER, "%lu", DEFAULT_UNIX_MAX_DGRAM_QLEN); | 172 | - r = write_string_filef("/proc/sys/net/unix/max_dgram_qlen", WRITE_STRING_FILE_DISABLE_BUFFER, |
| 176 | + r = write_string_filef("/proc/sys/net/unix/max_dgram_qlen", 0, "%lu", DEFAULT_UNIX_MAX_DGRAM_QLEN); | 173 | + r = write_string_filef("/proc/sys/net/unix/max_dgram_qlen", 0, |
| 174 | "%lu", DEFAULT_UNIX_MAX_DGRAM_QLEN); | ||
| 177 | if (r < 0) | 175 | if (r < 0) |
| 178 | return log_full_errno(IN_SET(r, -EROFS, -EPERM, -EACCES) ? LOG_DEBUG : LOG_WARNING, r, | 176 | return log_full_errno(IN_SET(r, -EROFS, -EPERM, -EACCES) ? LOG_DEBUG : LOG_WARNING, r, |
| 179 | "Failed to bump AF_UNIX datagram queue length, ignoring: %m"); | 177 | @@ -1737,7 +1737,7 @@ static void initialize_core_pattern(bool |
| 180 | @@ -1679,7 +1679,7 @@ static void initialize_core_pattern(bool skip_setup) { | ||
| 181 | if (getpid_cached() != 1) | 178 | if (getpid_cached() != 1) |
| 182 | return; | 179 | return; |
| 183 | 180 | ||
| 184 | - r = write_string_file("/proc/sys/kernel/core_pattern", arg_early_core_pattern, WRITE_STRING_FILE_DISABLE_BUFFER); | 181 | - r = write_string_file("/proc/sys/kernel/core_pattern", arg_early_core_pattern, WRITE_STRING_FILE_DISABLE_BUFFER); |
| 185 | + r = write_string_file("/proc/sys/kernel/core_pattern", arg_early_core_pattern, 0); | 182 | + r = write_string_file("/proc/sys/kernel/core_pattern", arg_early_core_pattern, 0); |
| 186 | if (r < 0) | 183 | if (r < 0) |
| 187 | log_warning_errno(r, "Failed to write '%s' to /proc/sys/kernel/core_pattern, ignoring: %m", arg_early_core_pattern); | 184 | log_warning_errno(r, "Failed to write '%s' to /proc/sys/kernel/core_pattern, ignoring: %m", |
| 188 | } | 185 | arg_early_core_pattern); |
| 189 | diff --git a/src/core/smack-setup.c b/src/core/smack-setup.c | ||
| 190 | index 79c4808473..b111ce0a11 100644 | ||
| 191 | --- a/src/core/smack-setup.c | 186 | --- a/src/core/smack-setup.c |
| 192 | +++ b/src/core/smack-setup.c | 187 | +++ b/src/core/smack-setup.c |
| 193 | @@ -323,17 +323,17 @@ int mac_smack_setup(bool *loaded_policy) { | 188 | @@ -320,17 +320,17 @@ int mac_smack_setup(bool *loaded_policy) |
| 194 | } | 189 | } |
| 195 | 190 | ||
| 196 | #ifdef SMACK_RUN_LABEL | 191 | #if HAVE_SMACK_RUN_LABEL |
| 197 | - r = write_string_file("/proc/self/attr/current", SMACK_RUN_LABEL, WRITE_STRING_FILE_DISABLE_BUFFER); | 192 | - r = write_string_file("/proc/self/attr/current", SMACK_RUN_LABEL, WRITE_STRING_FILE_DISABLE_BUFFER); |
| 198 | + r = write_string_file("/proc/self/attr/current", SMACK_RUN_LABEL, 0); | 193 | + r = write_string_file("/proc/self/attr/current", SMACK_RUN_LABEL, 0); |
| 199 | if (r < 0) | 194 | if (r < 0) |
| @@ -212,8 +207,6 @@ index 79c4808473..b111ce0a11 100644 | |||
| 212 | if (r < 0) | 207 | if (r < 0) |
| 213 | log_warning_errno(r, "Failed to set SMACK netlabel rule \"127.0.0.1 -CIPSO\": %m"); | 208 | log_warning_errno(r, "Failed to set SMACK netlabel rule \"127.0.0.1 -CIPSO\": %m"); |
| 214 | #endif | 209 | #endif |
| 215 | diff --git a/src/hibernate-resume/hibernate-resume.c b/src/hibernate-resume/hibernate-resume.c | ||
| 216 | index 58e35e403e..1d0beb4008 100644 | ||
| 217 | --- a/src/hibernate-resume/hibernate-resume.c | 210 | --- a/src/hibernate-resume/hibernate-resume.c |
| 218 | +++ b/src/hibernate-resume/hibernate-resume.c | 211 | +++ b/src/hibernate-resume/hibernate-resume.c |
| 219 | @@ -45,7 +45,7 @@ int main(int argc, char *argv[]) { | 212 | @@ -45,7 +45,7 @@ int main(int argc, char *argv[]) { |
| @@ -225,11 +218,9 @@ index 58e35e403e..1d0beb4008 100644 | |||
| 225 | if (r < 0) { | 218 | if (r < 0) { |
| 226 | log_error_errno(r, "Failed to write '%s' to /sys/power/resume: %m", major_minor); | 219 | log_error_errno(r, "Failed to write '%s' to /sys/power/resume: %m", major_minor); |
| 227 | return EXIT_FAILURE; | 220 | return EXIT_FAILURE; |
| 228 | diff --git a/src/libsystemd/sd-device/sd-device.c b/src/libsystemd/sd-device/sd-device.c | ||
| 229 | index 388128bf33..695f535ff4 100644 | ||
| 230 | --- a/src/libsystemd/sd-device/sd-device.c | 221 | --- a/src/libsystemd/sd-device/sd-device.c |
| 231 | +++ b/src/libsystemd/sd-device/sd-device.c | 222 | +++ b/src/libsystemd/sd-device/sd-device.c |
| 232 | @@ -2096,7 +2096,7 @@ _public_ int sd_device_set_sysattr_value(sd_device *device, const char *sysattr, | 223 | @@ -2108,7 +2108,7 @@ _public_ int sd_device_set_sysattr_value |
| 233 | if (!value) | 224 | if (!value) |
| 234 | return -ENOMEM; | 225 | return -ENOMEM; |
| 235 | 226 | ||
| @@ -238,11 +229,9 @@ index 388128bf33..695f535ff4 100644 | |||
| 238 | if (r < 0) { | 229 | if (r < 0) { |
| 239 | /* On failure, clear cache entry, as we do not know how it fails. */ | 230 | /* On failure, clear cache entry, as we do not know how it fails. */ |
| 240 | device_remove_cached_sysattr_value(device, sysattr); | 231 | device_remove_cached_sysattr_value(device, sysattr); |
| 241 | diff --git a/src/nspawn/nspawn-cgroup.c b/src/nspawn/nspawn-cgroup.c | ||
| 242 | index cb01b25bc6..e92051268b 100644 | ||
| 243 | --- a/src/nspawn/nspawn-cgroup.c | 232 | --- a/src/nspawn/nspawn-cgroup.c |
| 244 | +++ b/src/nspawn/nspawn-cgroup.c | 233 | +++ b/src/nspawn/nspawn-cgroup.c |
| 245 | @@ -124,7 +124,7 @@ int sync_cgroup(pid_t pid, CGroupUnified unified_requested, uid_t uid_shift) { | 234 | @@ -124,7 +124,7 @@ int sync_cgroup(pid_t pid, CGroupUnified |
| 246 | fn = strjoina(tree, cgroup, "/cgroup.procs"); | 235 | fn = strjoina(tree, cgroup, "/cgroup.procs"); |
| 247 | 236 | ||
| 248 | sprintf(pid_string, PID_FMT, pid); | 237 | sprintf(pid_string, PID_FMT, pid); |
| @@ -251,11 +240,9 @@ index cb01b25bc6..e92051268b 100644 | |||
| 251 | if (r < 0) { | 240 | if (r < 0) { |
| 252 | log_error_errno(r, "Failed to move process: %m"); | 241 | log_error_errno(r, "Failed to move process: %m"); |
| 253 | goto finish; | 242 | goto finish; |
| 254 | diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c | ||
| 255 | index ff08ed23cc..e7c4a874a9 100644 | ||
| 256 | --- a/src/nspawn/nspawn.c | 243 | --- a/src/nspawn/nspawn.c |
| 257 | +++ b/src/nspawn/nspawn.c | 244 | +++ b/src/nspawn/nspawn.c |
| 258 | @@ -2751,7 +2751,7 @@ static int reset_audit_loginuid(void) { | 245 | @@ -2757,7 +2757,7 @@ static int reset_audit_loginuid(void) { |
| 259 | if (streq(p, "4294967295")) | 246 | if (streq(p, "4294967295")) |
| 260 | return 0; | 247 | return 0; |
| 261 | 248 | ||
| @@ -264,7 +251,7 @@ index ff08ed23cc..e7c4a874a9 100644 | |||
| 264 | if (r < 0) { | 251 | if (r < 0) { |
| 265 | log_error_errno(r, | 252 | log_error_errno(r, |
| 266 | "Failed to reset audit login UID. This probably means that your kernel is too\n" | 253 | "Failed to reset audit login UID. This probably means that your kernel is too\n" |
| 267 | @@ -4148,7 +4148,7 @@ static int setup_uid_map( | 254 | @@ -4163,7 +4163,7 @@ static int setup_uid_map( |
| 268 | return log_oom(); | 255 | return log_oom(); |
| 269 | 256 | ||
| 270 | xsprintf(uid_map, "/proc/" PID_FMT "/uid_map", pid); | 257 | xsprintf(uid_map, "/proc/" PID_FMT "/uid_map", pid); |
| @@ -273,7 +260,7 @@ index ff08ed23cc..e7c4a874a9 100644 | |||
| 273 | if (r < 0) | 260 | if (r < 0) |
| 274 | return log_error_errno(r, "Failed to write UID map: %m"); | 261 | return log_error_errno(r, "Failed to write UID map: %m"); |
| 275 | 262 | ||
| 276 | @@ -4158,7 +4158,7 @@ static int setup_uid_map( | 263 | @@ -4173,7 +4173,7 @@ static int setup_uid_map( |
| 277 | return log_oom(); | 264 | return log_oom(); |
| 278 | 265 | ||
| 279 | xsprintf(uid_map, "/proc/" PID_FMT "/gid_map", pid); | 266 | xsprintf(uid_map, "/proc/" PID_FMT "/gid_map", pid); |
| @@ -282,11 +269,9 @@ index ff08ed23cc..e7c4a874a9 100644 | |||
| 282 | if (r < 0) | 269 | if (r < 0) |
| 283 | return log_error_errno(r, "Failed to write GID map: %m"); | 270 | return log_error_errno(r, "Failed to write GID map: %m"); |
| 284 | 271 | ||
| 285 | diff --git a/src/shared/cgroup-setup.c b/src/shared/cgroup-setup.c | ||
| 286 | index f197f715c7..077f893177 100644 | ||
| 287 | --- a/src/shared/cgroup-setup.c | 272 | --- a/src/shared/cgroup-setup.c |
| 288 | +++ b/src/shared/cgroup-setup.c | 273 | +++ b/src/shared/cgroup-setup.c |
| 289 | @@ -267,7 +267,7 @@ int cg_attach(const char *controller, const char *path, pid_t pid) { | 274 | @@ -345,7 +345,7 @@ int cg_attach(const char *controller, co |
| 290 | 275 | ||
| 291 | xsprintf(c, PID_FMT "\n", pid); | 276 | xsprintf(c, PID_FMT "\n", pid); |
| 292 | 277 | ||
| @@ -295,7 +280,7 @@ index f197f715c7..077f893177 100644 | |||
| 295 | if (r < 0) | 280 | if (r < 0) |
| 296 | return r; | 281 | return r; |
| 297 | 282 | ||
| 298 | @@ -799,7 +799,7 @@ int cg_enable_everywhere( | 283 | @@ -877,7 +877,7 @@ int cg_enable_everywhere( |
| 299 | return log_debug_errno(errno, "Failed to open cgroup.subtree_control file of %s: %m", p); | 284 | return log_debug_errno(errno, "Failed to open cgroup.subtree_control file of %s: %m", p); |
| 300 | } | 285 | } |
| 301 | 286 | ||
| @@ -304,31 +289,9 @@ index f197f715c7..077f893177 100644 | |||
| 304 | if (r < 0) { | 289 | if (r < 0) { |
| 305 | log_debug_errno(r, "Failed to %s controller %s for %s (%s): %m", | 290 | log_debug_errno(r, "Failed to %s controller %s for %s (%s): %m", |
| 306 | FLAGS_SET(mask, bit) ? "enable" : "disable", n, p, fs); | 291 | FLAGS_SET(mask, bit) ? "enable" : "disable", n, p, fs); |
| 307 | diff --git a/src/shared/mount-util.c b/src/shared/mount-util.c | ||
| 308 | index 594efea989..d243b45bc4 100644 | ||
| 309 | --- a/src/shared/mount-util.c | ||
| 310 | +++ b/src/shared/mount-util.c | ||
| 311 | @@ -1019,13 +1019,13 @@ static int make_userns(uid_t uid_shift, uid_t uid_range) { | ||
| 312 | xsprintf(line, UID_FMT " " UID_FMT " " UID_FMT "\n", 0, uid_shift, uid_range); | ||
| 313 | |||
| 314 | xsprintf(uid_map, "/proc/" PID_FMT "/uid_map", pid); | ||
| 315 | - r = write_string_file(uid_map, line, WRITE_STRING_FILE_DISABLE_BUFFER); | ||
| 316 | + r = write_string_file(uid_map, line, 0); | ||
| 317 | if (r < 0) | ||
| 318 | return log_error_errno(r, "Failed to write UID map: %m"); | ||
| 319 | |||
| 320 | /* We always assign the same UID and GID ranges */ | ||
| 321 | xsprintf(uid_map, "/proc/" PID_FMT "/gid_map", pid); | ||
| 322 | - r = write_string_file(uid_map, line, WRITE_STRING_FILE_DISABLE_BUFFER); | ||
| 323 | + r = write_string_file(uid_map, line, 0); | ||
| 324 | if (r < 0) | ||
| 325 | return log_error_errno(r, "Failed to write GID map: %m"); | ||
| 326 | |||
| 327 | diff --git a/src/shared/smack-util.c b/src/shared/smack-util.c | ||
| 328 | index 3362ee3924..80c0f2a52e 100644 | ||
| 329 | --- a/src/shared/smack-util.c | 292 | --- a/src/shared/smack-util.c |
| 330 | +++ b/src/shared/smack-util.c | 293 | +++ b/src/shared/smack-util.c |
| 331 | @@ -114,7 +114,7 @@ int mac_smack_apply_pid(pid_t pid, const char *label) { | 294 | @@ -114,7 +114,7 @@ int mac_smack_apply_pid(pid_t pid, const |
| 332 | return 0; | 295 | return 0; |
| 333 | 296 | ||
| 334 | p = procfs_file_alloca(pid, "attr/current"); | 297 | p = procfs_file_alloca(pid, "attr/current"); |
| @@ -337,11 +300,9 @@ index 3362ee3924..80c0f2a52e 100644 | |||
| 337 | if (r < 0) | 300 | if (r < 0) |
| 338 | return r; | 301 | return r; |
| 339 | 302 | ||
| 340 | diff --git a/src/sleep/sleep.c b/src/sleep/sleep.c | ||
| 341 | index a3aeb24633..d3e68e1b94 100644 | ||
| 342 | --- a/src/sleep/sleep.c | 303 | --- a/src/sleep/sleep.c |
| 343 | +++ b/src/sleep/sleep.c | 304 | +++ b/src/sleep/sleep.c |
| 344 | @@ -46,7 +46,7 @@ static int write_hibernate_location_info(const HibernateLocation *hibernate_loca | 305 | @@ -46,7 +46,7 @@ static int write_hibernate_location_info |
| 345 | assert(hibernate_location->swap); | 306 | assert(hibernate_location->swap); |
| 346 | 307 | ||
| 347 | xsprintf(resume_str, "%u:%u", major(hibernate_location->devno), minor(hibernate_location->devno)); | 308 | xsprintf(resume_str, "%u:%u", major(hibernate_location->devno), minor(hibernate_location->devno)); |
| @@ -350,7 +311,7 @@ index a3aeb24633..d3e68e1b94 100644 | |||
| 350 | if (r < 0) | 311 | if (r < 0) |
| 351 | return log_debug_errno(r, "Failed to write partition device to /sys/power/resume for '%s': '%s': %m", | 312 | return log_debug_errno(r, "Failed to write partition device to /sys/power/resume for '%s': '%s': %m", |
| 352 | hibernate_location->swap->device, resume_str); | 313 | hibernate_location->swap->device, resume_str); |
| 353 | @@ -73,7 +73,7 @@ static int write_hibernate_location_info(const HibernateLocation *hibernate_loca | 314 | @@ -73,7 +73,7 @@ static int write_hibernate_location_info |
| 354 | } | 315 | } |
| 355 | 316 | ||
| 356 | xsprintf(offset_str, "%" PRIu64, hibernate_location->offset); | 317 | xsprintf(offset_str, "%" PRIu64, hibernate_location->offset); |
| @@ -368,7 +329,7 @@ index a3aeb24633..d3e68e1b94 100644 | |||
| 368 | if (k >= 0) | 329 | if (k >= 0) |
| 369 | return 0; | 330 | return 0; |
| 370 | 331 | ||
| 371 | @@ -112,7 +112,7 @@ static int write_state(FILE **f, char **states) { | 332 | @@ -112,7 +112,7 @@ static int write_state(FILE **f, char ** |
| 372 | STRV_FOREACH(state, states) { | 333 | STRV_FOREACH(state, states) { |
| 373 | int k; | 334 | int k; |
| 374 | 335 | ||
| @@ -377,11 +338,9 @@ index a3aeb24633..d3e68e1b94 100644 | |||
| 377 | if (k >= 0) | 338 | if (k >= 0) |
| 378 | return 0; | 339 | return 0; |
| 379 | log_debug_errno(k, "Failed to write '%s' to /sys/power/state: %m", *state); | 340 | log_debug_errno(k, "Failed to write '%s' to /sys/power/state: %m", *state); |
| 380 | diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c | ||
| 381 | index d1c3febdd5..1cc68694d1 100644 | ||
| 382 | --- a/src/vconsole/vconsole-setup.c | 341 | --- a/src/vconsole/vconsole-setup.c |
| 383 | +++ b/src/vconsole/vconsole-setup.c | 342 | +++ b/src/vconsole/vconsole-setup.c |
| 384 | @@ -116,7 +116,7 @@ static int toggle_utf8_vc(const char *name, int fd, bool utf8) { | 343 | @@ -108,7 +108,7 @@ static int toggle_utf8_vc(const char *na |
| 385 | static int toggle_utf8_sysfs(bool utf8) { | 344 | static int toggle_utf8_sysfs(bool utf8) { |
| 386 | int r; | 345 | int r; |
| 387 | 346 | ||
| @@ -390,3 +349,72 @@ index d1c3febdd5..1cc68694d1 100644 | |||
| 390 | if (r < 0) | 349 | if (r < 0) |
| 391 | return log_warning_errno(r, "Failed to %s sysfs UTF-8 flag: %m", enable_disable(utf8)); | 350 | return log_warning_errno(r, "Failed to %s sysfs UTF-8 flag: %m", enable_disable(utf8)); |
| 392 | 351 | ||
| 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/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch b/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch index e9b7c1c078..2d06ab84a2 100644 --- a/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch +++ b/meta/recipes-core/systemd/systemd/0026-Handle-missing-gshadow.patch | |||
| @@ -17,8 +17,6 @@ Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com> | |||
| 17 | src/shared/userdb.c | 7 ++++++- | 17 | src/shared/userdb.c | 7 ++++++- |
| 18 | 3 files changed, 30 insertions(+), 1 deletion(-) | 18 | 3 files changed, 30 insertions(+), 1 deletion(-) |
| 19 | 19 | ||
| 20 | diff --git a/src/shared/user-record-nss.c b/src/shared/user-record-nss.c | ||
| 21 | index 88b8fc2f8f..a819d41bac 100644 | ||
| 22 | --- a/src/shared/user-record-nss.c | 20 | --- a/src/shared/user-record-nss.c |
| 23 | +++ b/src/shared/user-record-nss.c | 21 | +++ b/src/shared/user-record-nss.c |
| 24 | @@ -331,8 +331,10 @@ int nss_group_to_group_record( | 22 | @@ -331,8 +331,10 @@ int nss_group_to_group_record( |
| @@ -48,7 +46,7 @@ index 88b8fc2f8f..a819d41bac 100644 | |||
| 48 | 46 | ||
| 49 | r = json_build(&g->json, JSON_BUILD_OBJECT( | 47 | r = json_build(&g->json, JSON_BUILD_OBJECT( |
| 50 | JSON_BUILD_PAIR("groupName", JSON_BUILD_STRING(g->group_name)), | 48 | JSON_BUILD_PAIR("groupName", JSON_BUILD_STRING(g->group_name)), |
| 51 | @@ -388,6 +392,7 @@ int nss_sgrp_for_group(const struct group *grp, struct sgrp *ret_sgrp, char **re | 49 | @@ -388,6 +392,7 @@ int nss_sgrp_for_group(const struct grou |
| 52 | assert(ret_sgrp); | 50 | assert(ret_sgrp); |
| 53 | assert(ret_buffer); | 51 | assert(ret_buffer); |
| 54 | 52 | ||
| @@ -56,7 +54,7 @@ index 88b8fc2f8f..a819d41bac 100644 | |||
| 56 | for (;;) { | 54 | for (;;) { |
| 57 | _cleanup_free_ char *buf = NULL; | 55 | _cleanup_free_ char *buf = NULL; |
| 58 | struct sgrp sgrp, *result; | 56 | struct sgrp sgrp, *result; |
| 59 | @@ -416,6 +421,9 @@ int nss_sgrp_for_group(const struct group *grp, struct sgrp *ret_sgrp, char **re | 57 | @@ -416,6 +421,9 @@ int nss_sgrp_for_group(const struct grou |
| 60 | buflen *= 2; | 58 | buflen *= 2; |
| 61 | buf = mfree(buf); | 59 | buf = mfree(buf); |
| 62 | } | 60 | } |
| @@ -122,8 +120,6 @@ index 88b8fc2f8f..a819d41bac 100644 | |||
| 122 | if (r < 0) | 120 | if (r < 0) |
| 123 | return r; | 121 | return r; |
| 124 | 122 | ||
| 125 | diff --git a/src/shared/user-record-nss.h b/src/shared/user-record-nss.h | ||
| 126 | index 22ab04d6ee..4e52e7a911 100644 | ||
| 127 | --- a/src/shared/user-record-nss.h | 123 | --- a/src/shared/user-record-nss.h |
| 128 | +++ b/src/shared/user-record-nss.h | 124 | +++ b/src/shared/user-record-nss.h |
| 129 | @@ -2,7 +2,11 @@ | 125 | @@ -2,7 +2,11 @@ |
| @@ -138,11 +134,9 @@ index 22ab04d6ee..4e52e7a911 100644 | |||
| 138 | #include <pwd.h> | 134 | #include <pwd.h> |
| 139 | #include <shadow.h> | 135 | #include <shadow.h> |
| 140 | 136 | ||
| 141 | diff --git a/src/shared/userdb.c b/src/shared/userdb.c | ||
| 142 | index 91ac7c3832..20881ece84 100644 | ||
| 143 | --- a/src/shared/userdb.c | 137 | --- a/src/shared/userdb.c |
| 144 | +++ b/src/shared/userdb.c | 138 | +++ b/src/shared/userdb.c |
| 145 | @@ -1047,13 +1047,15 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) { | 139 | @@ -1046,13 +1046,15 @@ int groupdb_iterator_get(UserDBIterator |
| 146 | if (gr) { | 140 | if (gr) { |
| 147 | _cleanup_free_ char *buffer = NULL; | 141 | _cleanup_free_ char *buffer = NULL; |
| 148 | bool incomplete = false; | 142 | bool incomplete = false; |
| @@ -159,7 +153,7 @@ index 91ac7c3832..20881ece84 100644 | |||
| 159 | if (!FLAGS_SET(iterator->flags, USERDB_SUPPRESS_SHADOW)) { | 153 | if (!FLAGS_SET(iterator->flags, USERDB_SUPPRESS_SHADOW)) { |
| 160 | r = nss_sgrp_for_group(gr, &sgrp, &buffer); | 154 | r = nss_sgrp_for_group(gr, &sgrp, &buffer); |
| 161 | if (r < 0) { | 155 | if (r < 0) { |
| 162 | @@ -1066,6 +1068,9 @@ int groupdb_iterator_get(UserDBIterator *iterator, GroupRecord **ret) { | 156 | @@ -1065,6 +1067,9 @@ int groupdb_iterator_get(UserDBIterator |
| 163 | } | 157 | } |
| 164 | 158 | ||
| 165 | r = nss_group_to_group_record(gr, r >= 0 ? &sgrp : NULL, ret); | 159 | r = nss_group_to_group_record(gr, r >= 0 ? &sgrp : NULL, ret); |
diff --git a/meta/recipes-core/systemd/systemd/0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch b/meta/recipes-core/systemd/systemd/0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch index b7fd3cddbb..f4a71be7cc 100644 --- a/meta/recipes-core/systemd/systemd/0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch +++ b/meta/recipes-core/systemd/systemd/0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch | |||
| @@ -15,8 +15,6 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
| 15 | src/basic/missing_syscall.h | 6 ++++++ | 15 | src/basic/missing_syscall.h | 6 ++++++ |
| 16 | 1 file changed, 6 insertions(+) | 16 | 1 file changed, 6 insertions(+) |
| 17 | 17 | ||
| 18 | diff --git a/src/basic/missing_syscall.h b/src/basic/missing_syscall.h | ||
| 19 | index 9e3a165857..4d59b3e7b0 100644 | ||
| 20 | --- a/src/basic/missing_syscall.h | 18 | --- a/src/basic/missing_syscall.h |
| 21 | +++ b/src/basic/missing_syscall.h | 19 | +++ b/src/basic/missing_syscall.h |
| 22 | @@ -20,6 +20,12 @@ | 20 | @@ -20,6 +20,12 @@ |
| @@ -24,11 +22,21 @@ index 9e3a165857..4d59b3e7b0 100644 | |||
| 24 | #endif | 22 | #endif |
| 25 | 23 | ||
| 26 | +#ifndef _MIPS_SIM_ABI32 | 24 | +#ifndef _MIPS_SIM_ABI32 |
| 27 | +#define _MIPS_SIM_ABI32 1 | 25 | +#define _MIPS_SIM_ABI32 1 |
| 28 | +#define _MIPS_SIM_NABI32 2 | 26 | +#define _MIPS_SIM_NABI32 2 |
| 29 | +#define _MIPS_SIM_ABI64 3 | 27 | +#define _MIPS_SIM_ABI64 3 |
| 30 | +#endif | 28 | +#endif |
| 31 | + | 29 | + |
| 30 | #include "macro.h" | ||
| 32 | #include "missing_keyctl.h" | 31 | #include "missing_keyctl.h" |
| 33 | #include "missing_stat.h" | 32 | #include "missing_stat.h" |
| 34 | #include "missing_syscall_def.h" | 33 | --- a/src/shared/base-filesystem.c |
| 34 | +++ b/src/shared/base-filesystem.c | ||
| 35 | @@ -19,6 +19,7 @@ | ||
| 36 | #include "string-util.h" | ||
| 37 | #include "umask-util.h" | ||
| 38 | #include "user-util.h" | ||
| 39 | +#include "missing_syscall.h" | ||
| 40 | |||
| 41 | typedef struct BaseFilesystem { | ||
| 42 | const char *dir; /* directory or symlink to create */ | ||
diff --git a/meta/recipes-core/systemd/systemd_250.3.bb b/meta/recipes-core/systemd/systemd_250.3.bb index 4dd668833a..de16a4d78d 100644 --- a/meta/recipes-core/systemd/systemd_250.3.bb +++ b/meta/recipes-core/systemd/systemd_250.3.bb | |||
| @@ -34,7 +34,6 @@ SRC_URI_MUSL = "\ | |||
| 34 | file://0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch \ | 34 | file://0003-missing_type.h-add-__compare_fn_t-and-comparison_fn_.patch \ |
| 35 | file://0004-add-fallback-parse_printf_format-implementation.patch \ | 35 | file://0004-add-fallback-parse_printf_format-implementation.patch \ |
| 36 | file://0005-src-basic-missing.h-check-for-missing-strndupa.patch \ | 36 | file://0005-src-basic-missing.h-check-for-missing-strndupa.patch \ |
| 37 | file://0006-Include-netinet-if_ether.h.patch \ | ||
| 38 | file://0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch \ | 37 | file://0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch \ |
| 39 | file://0008-add-missing-FTW_-macros-for-musl.patch \ | 38 | file://0008-add-missing-FTW_-macros-for-musl.patch \ |
| 40 | file://0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch \ | 39 | file://0009-fix-missing-of-__register_atfork-for-non-glibc-build.patch \ |
| @@ -54,6 +53,9 @@ SRC_URI_MUSL = "\ | |||
| 54 | file://0025-Handle-__cpu_mask-usage.patch \ | 53 | file://0025-Handle-__cpu_mask-usage.patch \ |
| 55 | file://0026-Handle-missing-gshadow.patch \ | 54 | file://0026-Handle-missing-gshadow.patch \ |
| 56 | file://0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch \ | 55 | file://0028-missing_syscall.h-Define-MIPS-ABI-defines-for-musl.patch \ |
| 56 | file://0001-pass-correct-parameters-to-getdents64.patch \ | ||
| 57 | file://0002-Add-sys-stat.h-for-S_IFDIR.patch \ | ||
| 58 | file://0001-Adjust-for-musl-headers.patch \ | ||
| 57 | " | 59 | " |
| 58 | 60 | ||
| 59 | PAM_PLUGINS = " \ | 61 | PAM_PLUGINS = " \ |
