Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 09 Aug 2026 23:07:31 +0000
From:      Enji Cooper <ngie@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 503f16182e08 - main - pmc(8): add missing headers to not rely on header pollution
Message-ID:  <6a790833.39806.6b2fb8a4@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=503f16182e08d58ce17843cf5a71c7dbc27af6b5

commit 503f16182e08d58ce17843cf5a71c7dbc27af6b5
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-08-09 23:05:33 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-08-09 23:07:03 +0000

    pmc(8): add missing headers to not rely on header pollution
    
    This mutes a number of complains from g++ about needing specific headers
    for functionality related to C strings and other function prototypes.
    
    Reported by:    g++ 14
---
 usr.sbin/pmc/cmd_pmc_summary.cc | 1 +
 usr.sbin/pmc/display.cc         | 1 +
 usr.sbin/pmc/view.cc            | 1 +
 usr.sbin/pmc/view.hh            | 2 ++
 4 files changed, 5 insertions(+)

diff --git a/usr.sbin/pmc/cmd_pmc_summary.cc b/usr.sbin/pmc/cmd_pmc_summary.cc
index 610c1fee7f0d..c1eb00c28672 100644
--- a/usr.sbin/pmc/cmd_pmc_summary.cc
+++ b/usr.sbin/pmc/cmd_pmc_summary.cc
@@ -65,6 +65,7 @@
 #include <libpmcstat.h>
 #include "cmd_pmc.h"
 
+#include <algorithm>
 #include <iostream>
 #include <string>
 #include <vector>
diff --git a/usr.sbin/pmc/display.cc b/usr.sbin/pmc/display.cc
index 454cb74e29bd..fe0c86336196 100644
--- a/usr.sbin/pmc/display.cc
+++ b/usr.sbin/pmc/display.cc
@@ -42,6 +42,7 @@
 #include <unistd.h>
 
 #include <cxxabi.h>
+#include <cstring>
 #include <iomanip>
 #include <ios>
 #include <iostream>
diff --git a/usr.sbin/pmc/view.cc b/usr.sbin/pmc/view.cc
index 352856939a66..a678c061d490 100644
--- a/usr.sbin/pmc/view.cc
+++ b/usr.sbin/pmc/view.cc
@@ -43,6 +43,7 @@
 #include <unistd.h>
 
 #include <cxxabi.h>
+#include <cstring>
 #include <iostream>
 #include <map>
 #include <set>
diff --git a/usr.sbin/pmc/view.hh b/usr.sbin/pmc/view.hh
index 46b7c49222f0..9a0702c08803 100644
--- a/usr.sbin/pmc/view.hh
+++ b/usr.sbin/pmc/view.hh
@@ -36,6 +36,8 @@
 #include <libutil.h>
 #include <gelf.h>
 
+#include <vector>
+
 #include "headers.hh"
 #include "util.hh"
 


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a790833.39806.6b2fb8a4>