From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=0.7 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 43405C433E0 for ; Thu, 2 Jul 2020 21:33:57 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 093F220724 for ; Thu, 2 Jul 2020 21:33:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=mindspring.com header.i=@mindspring.com header.b="clq6wMC8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 093F220724 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mindspring.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:51506 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jr6qC-0005b7-9W for qemu-devel@archiver.kernel.org; Thu, 02 Jul 2020 17:33:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42530) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jr6pS-00059X-Ce for qemu-devel@nongnu.org; Thu, 02 Jul 2020 17:33:10 -0400 Received: from elasmtp-masked.atl.sa.earthlink.net ([209.86.89.68]:44578) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jr6pQ-0005rV-45 for qemu-devel@nongnu.org; Thu, 02 Jul 2020 17:33:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mindspring.com; s=dk12062016; t=1593725588; bh=5k5Nn4LM7CuRbU1hzIBsnWuJWpISk4Ne8Gsn AnQAJrw=; h=Received:Message-ID:Date:From:User-Agent:MIME-Version: To:CC:Subject:References:In-Reply-To:Content-Type:X-ELNK-Trace: X-Originating-IP; b=clq6wMC8f1je692FS9ahpbeOLvPkeKkQeo2w7O+JWm4mQF rKB/atwZ7HRinrzKG2FG1R5QUouhCMJsNziecwTiOJY3Iqsirh6MUSiYBROiqevP6sI CWim1Wm/9dy2aSZz3xukU7LyX/MnfXCfcuYY/kWxkdrhSdJUQMlra0VHBp7UXhVvbft hPFlm8BlvjqsawZPjmHfTiwQ03U5ffVSnKvCpzxqMtAt0MHlB0NJdu2ChVatpYQ0Xs/ AePxSScu9Pl1KkdVaTJmGHGb8pnUqUPRoPIeCiLzJQQ7c1NOqz9BvIvAlk/mc12RBCM GHwvChkuPyFcEebzcr+uAwVgI0JA== DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=dk12062016; d=mindspring.com; b=WwFhKsP/fft8lvDojJZZqkaXDDlURSH6vJtbHkGl74Y47fKVw5VXJ+wtxVPI4xirY+LejNnTqQdmVa+h5/pXha4DsnirzNitvpMLan1M48+TVJ3cmysjBWOBhODUPWd9QF/MjV76EAtqRzpC0OvpRVQHe5kkmhRS2kwIiSt5vjr/dmW2LEGUc+Ic5LenHCMLngrwNQldKYMUwnTHxJ8JeO1hVlCf/OvAhs/xhhopsSuPSyxQm0djAhwB0P7xOFIBBBbXXxXCc1n47zP38vuQZlYN5WcNuz+VKnAJlIuIsuTSx063AOkvx0ivcAFCeK3KsGdTCV2+bWp7sj9TFolPQA==; h=Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:X-ELNK-Trace:X-Originating-IP; Received: from [8.9.81.230] (helo=[192.168.0.78]) by elasmtp-masked.atl.sa.earthlink.net with esmtpa (Exim 4) (envelope-from ) id 1jr6pN-000Bb6-Pg; Thu, 02 Jul 2020 17:33:05 -0400 Message-ID: <5EFE5291.6030300@mindspring.com> Date: Thu, 02 Jul 2020 17:33:05 -0400 From: Michele Denber User-Agent: Mozilla/5.0 (X11; SunOS sun4v; rv:10.0.7) Gecko/20121005 Thunderbird/10.0.7 MIME-Version: 1.0 To: Thomas Huth Subject: Re: [PATCH] configure / util: Auto-detect the availability of openpty() References: <20200702143955.678-1-thuth@redhat.com> <5EFE07BC.6040407@mindspring.com> <1e699fdc-639e-ef8a-313f-7e665cad868c@redhat.com> In-Reply-To: <1e699fdc-639e-ef8a-313f-7e665cad868c@redhat.com> Content-Type: multipart/alternative; boundary="------------080407090606010809000603" X-ELNK-Trace: 17a948d2f1835c375e89bb4777695beb24867385ea7beca52a5bf1ecbc992f665fcf2c362b6908e3350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 8.9.81.230 Received-SPF: pass client-ip=209.86.89.68; envelope-from=denber@mindspring.com; helo=elasmtp-masked.atl.sa.earthlink.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/07/02 17:33:06 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Tribble , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This is a multi-part message in MIME format. --------------080407090606010809000603 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 07/02/20 13:34, Thomas Huth wrote: > > That's just the context, cut at three lines after the last change. > Simply try to apply the patch with "patch -p1 -i ..." or "git am" in a > separate git branch if you're using git. It should hopefully apply > cleanly. Looks like it partly worked: root@hemlock:~/qemu-5.0.0# gpatch -p1 -i < configpatch.diff gpatch: option requires an argument -- 'i' gpatch: Try 'gpatch --help' for more information. root@hemlock:~/qemu-5.0.0# gpatch -p1 < configpatch.diff patching file configure Hunk #1 succeeded at 5049 (offset -85 lines). Hunk #2 succeeded at 7117 (offset -267 lines). patching file util/qemu-openpty.c Hunk #1 FAILED at 52. Hunk #2 succeeded at 95 with fuzz 2 (offset 2 lines). 1 out of 2 hunks FAILED -- saving rejects to file util/qemu-openpty.c.rej root@hemlock:~/qemu-5.0.0# cat util/qemu-openpty.c.rej --- util/qemu-openpty.c +++ util/qemu-openpty.c @@ -52,7 +52,8 @@ #endif #ifdef __sun__ -/* Once Solaris has openpty(), this is going to be removed. */ + +#if !defined(HAVE_OPENPTY) static int openpty(int *amaster, int *aslave, char *name, struct termios *termp, struct winsize *winp) { root@hemlock:~/qemu-5.0.0# - Michele --------------080407090606010809000603 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit On 07/02/20 13:34, Thomas Huth wrote:

That's just the context, cut at three lines after the last change. Simply try to apply the patch with "patch -p1 -i ..." or "git am" in a separate git branch if you're using git. It should hopefully apply cleanly.

Looks like it partly worked:

root@hemlock:~/qemu-5.0.0# gpatch -p1 -i < configpatch.diff
gpatch: option requires an argument -- 'i'
gpatch: Try 'gpatch --help' for more information.
root@hemlock:~/qemu-5.0.0# gpatch -p1 < configpatch.diff
patching file configure
Hunk #1 succeeded at 5049 (offset -85 lines).
Hunk #2 succeeded at 7117 (offset -267 lines).
patching file util/qemu-openpty.c
Hunk #1 FAILED at 52.
Hunk #2 succeeded at 95 with fuzz 2 (offset 2 lines).
1 out of 2 hunks FAILED -- saving rejects to file util/qemu-openpty.c.rej
root@hemlock:~/qemu-5.0.0# cat util/qemu-openpty.c.rej
--- util/qemu-openpty.c
+++ util/qemu-openpty.c
@@ -52,7 +52,8 @@
 #endif
 
 #ifdef __sun__
-/* Once Solaris has openpty(), this is going to be removed. */
+
+#if !defined(HAVE_OPENPTY)
 static int openpty(int *amaster, int *aslave, char *name,
                    struct termios *termp, struct winsize *winp)
 {
root@hemlock:~/qemu-5.0.0#


            - Michele

--------------080407090606010809000603--