From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 33ruFmKa2GKpaxcAWB0awg (envelope-from ) for ; Wed, 20 Jul 2022 20:14:26 -0400 Received: by simark.ca (Postfix, from userid 112) id 515001E5EA; Wed, 20 Jul 2022 20:14:26 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=MoE5YJLG; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 068801E13B for ; Wed, 20 Jul 2022 20:14:26 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5F8DE385829E for ; Thu, 21 Jul 2022 00:14:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5F8DE385829E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1658362465; bh=9XIVmuXQIDtQCpFKLAzEPsGpE5ZVJAl1h62Mo90DP1k=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=MoE5YJLGCr+7xn/FnSfjsTBnoko5EBEKehKpoCG8c6dCWjf6hIEtCNB/2yQ++x7Ta k4qJBEsgtcqA6q8kSh8sd5DJ5XL98NXfI4PO6LnPfMTWfg/kgm4yenIYji7HMSRfMG adEa1k7lTgtB1ghB8oErwrboQhboVbRUJgKtLM0k= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 74E253858D1E for ; Thu, 21 Jul 2022 00:14:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 74E253858D1E Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-664-zOmlI3LeMEikQBXSaRvM5w-1; Wed, 20 Jul 2022 20:14:04 -0400 X-MC-Unique: zOmlI3LeMEikQBXSaRvM5w-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D496F85A585 for ; Thu, 21 Jul 2022 00:14:03 +0000 (UTC) Received: from f36-1.lan (unknown [10.2.16.60]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7DA7890A04; Thu, 21 Jul 2022 00:14:03 +0000 (UTC) To: gdb-patches@sourceware.org Subject: [committed] Wrap python_write_bytecode with HAVE_PYTHON ifdef Date: Wed, 20 Jul 2022 17:13:06 -0700 Message-Id: <20220721001305.1015341-1-kevinb@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Kevin Buettner via Gdb-patches Reply-To: Kevin Buettner Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" This commit fixes a build error on machines lacking python headers and/or libraries. --- gdb/python/python.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gdb/python/python.c b/gdb/python/python.c index 2b85bbb6301..01b5145c2a4 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -1855,6 +1855,7 @@ show_python_dont_write_bytecode (struct ui_file *file, int from_tty, value); } +#ifdef HAVE_PYTHON /* Return value to assign to PyConfig.write_bytecode or, when negated (via !), Py_DontWriteBytecodeFlag. Py_DontWriteBytecodeFlag is deprecated in Python 3.12. */ @@ -1879,6 +1880,7 @@ python_write_bytecode () return wbc; } +#endif /* HAVE_PYTHON */ /* Implement 'set python dont-write-bytecode'. This sets Python's internal flag no matter when the command is issued, however, if this is used -- 2.36.1