All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nick Desaulniers <ndesaulniers@google.com>
To: linux-media@vger.kernel.org, Yi Kong <yikong@google.com>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Subject: [PATCH v4l-utils] v4l-utils: include cstdlib for std::exit
Date: Fri, 17 Jul 2026 15:03:32 -0700	[thread overview]
Message-ID: <20260717-libcpp_transitive-v1-1-3af91860affe@google.com> (raw)

libc++ recently trimmed their list of transitive includes. Include
<cstdlib> for the declaration of std::exit to avoid compile time errors
against newer versions of libc++.

Fixes:

    v4l-utils/utils/v4l2-compliance/v4l2-test-input-output.cpp:53:11:
    error: no member named 'exit' in namespace 'std'; did you mean simply
    'exit'?
       53 |                         return fail("couldn't get freq band\n");
          |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    v4l-utils/utils/v4l2-compliance/v4l2-compliance.h:286:3: note:
    expanded from macro 'fail'
      286 |                 std::exit(EXIT_FAILURE);
          |                 ^    ~~~~
    bionic/libc/include/stdlib.h:55:17: note: 'exit' declared here
       55 | __noreturn void exit(int __status);
          |                 ^

Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
---
 utils/v4l2-compliance/v4l2-compliance.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/utils/v4l2-compliance/v4l2-compliance.h b/utils/v4l2-compliance/v4l2-compliance.h
index b43c5817..7ca4744e 100644
--- a/utils/v4l2-compliance/v4l2-compliance.h
+++ b/utils/v4l2-compliance/v4l2-compliance.h
@@ -25,6 +25,7 @@
 #include <set>
 #include <string>
 #include <cstdint>
+#include <cstdlib>
 
 #include <linux/videodev2.h>
 #include <linux/v4l2-subdev.h>

---
base-commit: b32589c514810daacc05a2015d205b997cd11970
change-id: 20260717-libcpp_transitive-0c6a9e39e5f9

Best regards,
-- 
Nick Desaulniers <ndesaulniers@google.com>


                 reply	other threads:[~2026-07-17 22:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260717-libcpp_transitive-v1-1-3af91860affe@google.com \
    --to=ndesaulniers@google.com \
    --cc=linux-media@vger.kernel.org \
    --cc=yikong@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.