From: Thomas Bonnefille via buildroot <buildroot@buildroot.org>
To: buildroot@buildroot.org
Cc: "Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
"Miquèl Raynal" <miquel.raynal@bootlin.com>,
"Thomas Bonnefille" <thomas.bonnefille@bootlin.com>
Subject: [Buildroot] [PATCH] package/uemacs: fix call to cuserid
Date: Sat, 18 Jan 2025 12:34:45 +0100 [thread overview]
Message-ID: <20250118-fix_uemacs-v1-1-bb5334af45bd@bootlin.com> (raw)
cuserid is deprecated and breaks the compilation on some new toolchains.
This patch fixes this issue.
Fixes:
#81
Signed-off-by: Thomas Bonnefille <thomas.bonnefille@bootlin.com>
---
package/uemacs/02-Replace-cuserid.patch | 34 +++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/package/uemacs/02-Replace-cuserid.patch b/package/uemacs/02-Replace-cuserid.patch
new file mode 100644
index 0000000000000000000000000000000000000000..0e7eaf371f14a5e2bf2e0f38f08771bad4782c8d
--- /dev/null
+++ b/package/uemacs/02-Replace-cuserid.patch
@@ -0,0 +1,34 @@
+From 289ccf8f0e77ae4f240eca988eb3a6ac19afbae9 Mon Sep 17 00:00:00 2001
+From: Thomas Bonnefille <thomas.bonnefille@bootlin.com>
+Date: Fri, 17 Jan 2025 22:10:41 +0100
+Subject: [PATCH] Replace cuserid
+
+cuserid has been removed from some toolchains and is no longer in the
+POSIX standard since 1990. getlogin has been in the standard since 2001.
+
+This commit uncomments the call to getlogin and thus replaces cuserid
+with getlogin.
+
+Upstream: https://github.com/torvalds/uemacs/pull/46
+Signed-off-by: Thomas Bonnefille <thomas.bonnefille@bootlin.com>
+---
+ pklock.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/pklock.c b/pklock.c
+index dc30b76..5f4865b 100644
+--- a/pklock.c
++++ b/pklock.c
+@@ -80,8 +80,7 @@ char *dolock(char *fname)
+ }
+ if ((n = read(fd, locker, MAXNAME)) < 1) {
+ lseek(fd, 0, SEEK_SET);
+-/* strcpy(locker, getlogin()); */
+- cuserid(locker);
++ strcpy(locker, getlogin());
+ strcat(locker + strlen(locker), "@");
+ gethostname(locker + strlen(locker), 64);
+ write(fd, locker, strlen(locker));
+--
+2.48.1
+
---
base-commit: 027c9ce67ca21409faed9f9add7222cb3e5ba4d4
change-id: 20250118-fix_uemacs-93cbac0a6229
Best regards,
--
Thomas Bonnefille <thomas.bonnefille@bootlin.com>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next reply other threads:[~2025-01-18 11:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-18 11:34 Thomas Bonnefille via buildroot [this message]
2025-02-03 15:41 ` [Buildroot] [PATCH] package/uemacs: fix call to cuserid Peter Korsgaard
2025-02-04 14:18 ` Peter Korsgaard
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=20250118-fix_uemacs-v1-1-bb5334af45bd@bootlin.com \
--to=buildroot@buildroot.org \
--cc=miquel.raynal@bootlin.com \
--cc=thomas.bonnefille@bootlin.com \
--cc=thomas.petazzoni@bootlin.com \
/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.