From nobody Sun Sep 7 18:42:17 2025 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4cKf894DRkz66b99; Sun, 07 Sep 2025 18:42:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cKf893clZz40wN; Sun, 07 Sep 2025 18:42:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757270537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/uytDiKurCTxuJGaGYukoGkflpS/A/A+rHNDZsvAwnE=; b=MpvDwLP+V1m0a9kNVqCYSlJrQPTifUp3factANFWk/eF+bH7qqA/h2ImHlORKnsmM6Dq3a MRZU4JwzUuIRAtdxFvDM/r/g1Tx8ON8mkJYif67iMe2XKALBH3ui6E11ukbdd1L50NVBc6 fonmFxDmt0qQvUgkP3i5gpb5pYGZef3UXdWoKpJsfsKeuQ6SSCGqskyu85kDYVGbx8sRZA lZWx/hSjxg7JEpCLEbRVcHpN85UryWj2JB0nmEsfsbCdRCl7CloxVKbarCQkQePVK4vQxF OCdJ1A91NQCPlzujGKgE/44/quHbNy9LWYPq1ifNExe07TXcRAnf01q8SJLG6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757270537; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/uytDiKurCTxuJGaGYukoGkflpS/A/A+rHNDZsvAwnE=; b=uv44VOr3rF8id+Wfn4fyUIMTc2WbANvU+AlqxrOZaexVZ2gUfOuIJ3VqGbB7n9NRFLUcU0 UO9yBVa20Dmkun1EDnxWQ85utdi67CmaKKu37KW7rMH5ZsP5XXuYCRCk7vptt1SwhHv3sO aA9WHWGsjDyfk1VuPnwX7cstB3/8bamiiYe4p2CrzM8ysa7n+tuAfb6qJHVdmyjWmDJeLT mMmXAs0QLjq5DBl4DNm9xSa7QGcO3NaVp4LxW8uJN/i4EF3XHYgdfvG2RqlHdTP44s0K3l oKP0ZUNELqr5mBWgZfVjFRHBl9Z/iLvcNtnvnM7JYfHOriyB+xxwdJuLRFUFyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757270537; a=rsa-sha256; cv=none; b=hMB2GrnWMKOcfvdG5r1g8ESfLlw7OKa5CRUljGPXGoYcGT6URbnhK1h2VeVz9hGgGxyD2e INH4s9hBPJ5LkkkDWCDfamF73cxYgepuI9of9JwVj+hpV0KIEoN8A+GNjqU7y+cRVJNQtZ iB8Ne4CEXWMRa5AOfqjCIJAm2MFw17IXTagsnENUfMJHD3MhVrGiTNfZTuK0BFGQveWOSj zdgM3e5ccLkE3UJaqI6Nln/LpXIvtU4ROjPoJuzfZyLs3LHebKrfy4GAIdVDZZbWXgZQWu VYUTDGwLbDukacPgjWSxP5c3GpmfpQSZBTOCmWK7QkpELzhbGnkRo2wZfUANQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4cKf893B6szYBs; Sun, 07 Sep 2025 18:42:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 587IgHD5001640; Sun, 7 Sep 2025 18:42:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 587IgHbm001636; Sun, 7 Sep 2025 18:42:17 GMT (envelope-from git) Date: Sun, 7 Sep 2025 18:42:17 GMT Message-Id: <202509071842.587IgHbm001636@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ka Ho Ng Subject: git: 11ace56fa030 - main - contrib/libxo: fix API header files inclusions in C++ source files List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khng X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 11ace56fa030185025936c795d5cf7c57b266835 Auto-Submitted: auto-generated The branch main has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=11ace56fa030185025936c795d5cf7c57b266835 commit 11ace56fa030185025936c795d5cf7c57b266835 Author: ShengYi Hung AuthorDate: 2025-09-07 18:33:01 +0000 Commit: Ka Ho Ng CommitDate: 2025-09-07 18:33:01 +0000 contrib/libxo: fix API header files inclusions in C++ source files C++ source files need `extern "C"` to disable C++ name mangling. MFC after: 1 week Reviewed by: aokblast (previous version), phil, imp (previous version) Differential Revision: https://reviews.freebsd.org/D47930 --- contrib/libxo/libxo/xo.h | 8 ++++++++ contrib/libxo/libxo/xo_encoder.h | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/contrib/libxo/libxo/xo.h b/contrib/libxo/libxo/xo.h index 6a61a16c7cae..7f37b469b54e 100644 --- a/contrib/libxo/libxo/xo.h +++ b/contrib/libxo/libxo/xo.h @@ -27,6 +27,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + #ifdef __dead2 #define NORETURN __dead2 #else @@ -699,4 +703,8 @@ xo_retain_clear_all (void); void xo_retain_clear (const char *fmt); +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif /* INCLUDE_XO_H */ diff --git a/contrib/libxo/libxo/xo_encoder.h b/contrib/libxo/libxo/xo_encoder.h index 099248ae13a6..bb57194ab030 100644 --- a/contrib/libxo/libxo/xo_encoder.h +++ b/contrib/libxo/libxo/xo_encoder.h @@ -20,6 +20,10 @@ #include +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + /* * Expose libxo's memory allocation functions */ @@ -167,4 +171,8 @@ xo_encoder_op_name (xo_encoder_op_t op); void xo_failure (xo_handle_t *xop, const char *fmt, ...); +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif /* XO_ENCODER_H */