From 9a91eecbb0f9c4a949dce64b5b54f5f7b14f16fd Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mon, 21 Dec 2020 16:08:51 +0000 Subject: [PATCH] Port rpmostree-polkit-agent to C++ Prep for using https://cxx.rs/ --- Makefile-rpm-ostree.am | 2 +- .../{rpmostree-polkit-agent.c => rpmostree-polkit-agent.cxx} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename src/app/{rpmostree-polkit-agent.c => rpmostree-polkit-agent.cxx} (99%) diff --git a/Makefile-rpm-ostree.am b/Makefile-rpm-ostree.am index fa316673..e1adc585 100644 --- a/Makefile-rpm-ostree.am +++ b/Makefile-rpm-ostree.am @@ -53,7 +53,7 @@ rpm_ostree_SOURCES = src/app/main.cxx \ src/app/rpmostree-override-builtins.cxx \ src/app/rpmostree-libbuiltin.cxx \ src/app/rpmostree-libbuiltin.h \ - src/app/rpmostree-polkit-agent.c \ + src/app/rpmostree-polkit-agent.cxx \ src/app/rpmostree-polkit-agent.h \ src/app/rpmostree-builtin-kargs.c \ src/app/rpmostree-compose-builtin-tree.cxx \ diff --git a/src/app/rpmostree-polkit-agent.c b/src/app/rpmostree-polkit-agent.cxx similarity index 99% rename from src/app/rpmostree-polkit-agent.c rename to src/app/rpmostree-polkit-agent.cxx index c1990517..2e468c24 100644 --- a/src/app/rpmostree-polkit-agent.c +++ b/src/app/rpmostree-polkit-agent.cxx @@ -120,7 +120,7 @@ fork_agent (pid_t *pid, const char *path, ...) va_end(ap); /* Allocate strv */ - l = alloca (sizeof(char *) * (n + 1)); + l = (char**)alloca (sizeof(char *) * (n + 1)); /* Fill in arguments */ va_start (ap, path);