From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1nUBYb-0002fF-CG for mharc-grub-devel@gnu.org; Tue, 15 Mar 2022 14:06:05 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47110) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nUBYW-0002N6-5i for grub-devel@gnu.org; Tue, 15 Mar 2022 14:06:00 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:52441) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nUBYU-0008Sm-Gl for grub-devel@gnu.org; Tue, 15 Mar 2022 14:05:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1647367557; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=x8m6UHCIJVLAFKUhhwwrTWGLa7FmWOqAlMQovZMljkw=; b=OZfTw2CPTWxinTFtNXZZlpt7ECxrEOQIaPmjn49nG8EQ2j1+pfTfo89+j0ddN0bwS3GUv0 z+/EG2Wj5iC6p7/Ophwb+rLU6w3UXkJjN8eZVI7Ktaj7YSeYhMRowdAZRWlKF3yoFljTkk d+VmAbH5B8wZB3xgZxKIctT0jlr2Mgg= 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-91-TSW-AONvMz-k9sB0qJlvoA-1; Tue, 15 Mar 2022 14:05:54 -0400 X-MC-Unique: TSW-AONvMz-k9sB0qJlvoA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 468BC1010C4B; Tue, 15 Mar 2022 18:05:53 +0000 (UTC) Received: from eesha.redhat.com (unknown [10.22.50.2]) by smtp.corp.redhat.com (Postfix) with ESMTP id D1107141DEDA; Tue, 15 Mar 2022 18:05:52 +0000 (UTC) From: Robbie Harwood To: grub-devel@gnu.org Cc: dkiper@net-space.pl, Daniel Kiper , Robbie Harwood Subject: [PATCH v9 8/8] lib/posix_wrap/errno.h: Add __set_errno() macro Date: Tue, 15 Mar 2022 14:05:45 -0400 Message-Id: <20220315180545.54989-9-rharwood@redhat.com> In-Reply-To: <20220315180545.54989-1-rharwood@redhat.com> References: <20220315180545.54989-1-rharwood@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=rharwood@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Received-SPF: pass client-ip=170.10.129.124; envelope-from=rharwood@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Mar 2022 18:06:00 -0000 From: Daniel Kiper $ ./configure --target=x86_64-w64-mingw32 --with-platform=efi --host=x86_64-w64-mingw32 $ make [...] cat syminfo.lst | sort | gawk -f ./genmoddep.awk > moddep.lst || (rm -f moddep.lst; exit 1) __imp__errno in regexp is not defined This happens because grub-core/lib/gnulib/malloc/dynarray_resize.c and grub-core/lib/gnulib/malloc/dynarray_emplace_enlarge.c (both are used by regexp module) from the latest Gnulib call __set_errno() which originally sets errno variable (Windows builds add __imp__ prefix). Of course it is not defined and grub_errno should be used instead. Signed-off-by: Daniel Kiper Signed-off-by: Robbie Harwood --- grub-core/lib/posix_wrap/errno.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/grub-core/lib/posix_wrap/errno.h b/grub-core/lib/posix_wrap/errno.h index ba63b2366..5ede4fe69 100644 --- a/grub-core/lib/posix_wrap/errno.h +++ b/grub-core/lib/posix_wrap/errno.h @@ -26,4 +26,8 @@ #define EINVAL GRUB_ERR_BAD_NUMBER #define ENOMEM GRUB_ERR_OUT_OF_MEMORY +/* From glibc . */ +#ifndef __set_errno +# define __set_errno(val) (grub_errno = (val)) +#endif #endif -- 2.35.1