All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robbie Harwood <rharwood@redhat.com>
To: grub-devel@gnu.org
Cc: dkiper@net-space.pl, Daniel Kiper <daniel.kiper@oracle.com>,
	Robbie Harwood <rharwood@redhat.com>
Subject: [PATCH v9 8/8] lib/posix_wrap/errno.h: Add __set_errno() macro
Date: Tue, 15 Mar 2022 14:05:45 -0400	[thread overview]
Message-ID: <20220315180545.54989-9-rharwood@redhat.com> (raw)
In-Reply-To: <20220315180545.54989-1-rharwood@redhat.com>

From: Daniel Kiper <daniel.kiper@oracle.com>

$ ./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 <daniel.kiper@oracle.com>
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
---
 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 <errno.h>. */
+#ifndef __set_errno
+# define __set_errno(val) (grub_errno = (val))
+#endif
 #endif
-- 
2.35.1



  parent reply	other threads:[~2022-03-15 18:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-15 18:05 [PATCH v9 0/8] Update gnulib version and drop most gnulib patches Robbie Harwood
2022-03-15 18:05 ` [PATCH v9 1/8] Use visual indentation in config.h.in Robbie Harwood
2022-03-15 18:05 ` [PATCH v9 2/8] Where present, ensure config-util.h precedes config.h Robbie Harwood
2022-03-15 18:05 ` [PATCH v9 3/8] Drop gnulib fix-base64.patch Robbie Harwood
2022-03-15 18:05 ` [PATCH v9 4/8] Drop gnulib no-abort.patch Robbie Harwood
2022-03-15 18:05 ` [PATCH v9 5/8] Update gnulib version and drop most gnulib patches Robbie Harwood
2022-03-15 18:05 ` [PATCH v9 6/8] Handle warnings introduced by updated gnulib Robbie Harwood
2022-03-15 18:05 ` [PATCH v9 7/8] Fix various new autotools warnings Robbie Harwood
2022-03-15 18:05 ` Robbie Harwood [this message]
2022-03-16 18:12 ` [PATCH v9 0/8] Update gnulib version and drop most gnulib patches Daniel Kiper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220315180545.54989-9-rharwood@redhat.com \
    --to=rharwood@redhat.com \
    --cc=daniel.kiper@oracle.com \
    --cc=dkiper@net-space.pl \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.