From nobody Sun Sep 14 00:33:58 2025 X-Original-To: dev-commits-src-all@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 4cPTgC1MNCz67m1f; Sun, 14 Sep 2025 00:33:59 +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 4cPTgC0kw9z40rZ; Sun, 14 Sep 2025 00:33:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757810039; 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=UswTTg988DpCODgvpAbbKXJaR13NTxYUbXrNwgt1TQA=; b=dbXNKtLYy9oVHA4rpu6bUBpl6P4D/M4pg4fJBQ269x47Hab3K1PCf/LQWFJ8zfTXOpmvuH k0MojKVGTUkmm9eKJLxm5I0xTJBmnLRZxL4r48BOxfh+BgJgujh8ppzHQczjegdjvKfz2U UOKFCSC5/ycXmx4zJtiJJXPtTM/fcx96Y///qh+4dKGeDomQBlfGaonGcsLKYDHaQ7pdfd DYvWL8V/+4SlROCuGcFN5VIVVbBSTkmJeXSO5KDdbFd1FdtzKre+wF/u2hu3gmLUPdx6ub KvafO3J8ADU5X6h7tty2bAg0BM/Fbqwynof853xqD/5Hq5tXGA3nn+cAVHHrtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1757810039; 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=UswTTg988DpCODgvpAbbKXJaR13NTxYUbXrNwgt1TQA=; b=XCpedOP+EWL/1YHua0E6YcgiTssEy0Zq3D2eZlYSTLoFvqdJUVEFMEB7z23rGAbyJOTgJL hz8JGXzgEiN0ZLfXOpUVTPMyGyDLkOhJKBuJykCGxyLllXiKoblfRvDBMJ65fDJ/9Ts2ce Zvds1k7JdzpFiRb5NA0sPByN4oR7T9gADuJ8d0YMZGFYIb/pwaKHbrc8zWB3Pv0l2fvfjB WpoGabheJ5Kia1zw/mp3UKNxL+PDXm8oN25yD5zW+lYaIAKkFmFPfMnnClw18Y2n0my+4W AEvR07LHXuuFq+3Qhf+ITbx0IfHHkMXDsjUSj45edyNrvll+vD7A9+KOp1l6qQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1757810039; a=rsa-sha256; cv=none; b=mMH/51x4jN3o2eS3C1aLVqcnHAO9VTFkDVZj7GrSdo82jy01pKGUvKP/L7lonsyh0C1+FB c6uQ1mCBFcCTR2BtZHU80UnGerCLWF1KtUjQtzVYE4roSLPUP4UhEpDbsQFipFUaKGv6YS qHM7GWRxiGJbd+3J0AwBspW2dXGJf6872rcLc7qCLJppjj4uMj4Q9jBi96sxgFnCmGI8sj btMLf3cGRKGD2dOqlqSN5qoJGCsUUxsSf99DZGLWvDxD35hHyM/focAPVqD1J3ddxchsPx OUV8032m6KStpcdFCSUI/bVGL18IvWar+iT0BwvJmSMbt6ECHz5wAl1bX3rcBA== 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 4cPTgC0Lg7z11mj; Sun, 14 Sep 2025 00:33:59 +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 58E0Xwqd048748; Sun, 14 Sep 2025 00:33:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 58E0XwH1048745; Sun, 14 Sep 2025 00:33:58 GMT (envelope-from git) Date: Sun, 14 Sep 2025 00:33:58 GMT Message-Id: <202509140033.58E0XwH1048745@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ka Ho Ng Subject: git: c065db9f83ff - stable/14 - contrib/libxo: fix API header files inclusions in C++ source files List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: c065db9f83ff7c9fa9ce59d095c7e0f966f1df77 Auto-Submitted: auto-generated The branch stable/14 has been updated by khng: URL: https://cgit.FreeBSD.org/src/commit/?id=c065db9f83ff7c9fa9ce59d095c7e0f966f1df77 commit c065db9f83ff7c9fa9ce59d095c7e0f966f1df77 Author: ShengYi Hung AuthorDate: 2025-09-07 18:33:01 +0000 Commit: Ka Ho Ng CommitDate: 2025-09-14 00:33:40 +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 (cherry picked from commit 11ace56fa030185025936c795d5cf7c57b266835) --- 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 */