All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] host-mkpasswd: fix crash on Fedora 28 build host
@ 2018-05-02  9:05 Stefan Becker
  2018-05-02 17:57 ` Yann E. MORIN
                   ` (2 more replies)
  0 siblings, 3 replies; 38+ messages in thread
From: Stefan Becker @ 2018-05-02  9:05 UTC (permalink / raw)
  To: buildroot

crypt() is an optional glibc feature. Some distros, like Fedora 28, are
phasing it out to be replaced with libxcrypt [1]. Unfortunately this
change is only ABI compatible, not source code compatible, i.e. the code
will compile with warnings about undefined crypt(), but the resulting
binary will crash.

Follow the guidance in the Fedora bug and include crypt.h when
_XOPEN_CRYPT is not defined.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1566464

Signed-off-by: Stefan Becker <chemobejk@gmail.com>
---
 package/mkpasswd/mkpasswd.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/package/mkpasswd/mkpasswd.c b/package/mkpasswd/mkpasswd.c
index 5820f32501..fd16230468 100644
--- a/package/mkpasswd/mkpasswd.c
+++ b/package/mkpasswd/mkpasswd.c
@@ -44,6 +44,11 @@
 #include <sys/time.h>
 #endif
 
+/* glibc without crypt() */
+#ifndef _XOPEN_CRYPT
+#include <crypt.h>
+#endif
+
 /* Application-specific */
 #include "utils.h"
 
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2018-06-18  6:53 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-02  9:05 [Buildroot] [PATCH] host-mkpasswd: fix crash on Fedora 28 build host Stefan Becker
2018-05-02 17:57 ` Yann E. MORIN
2018-05-02 18:23   ` Stefan Becker
2018-05-02 20:38     ` Arnout Vandecappelle
2018-05-02 21:04       ` Yann E. MORIN
2018-05-03  6:11       ` Stefan Becker
2018-05-02 21:06     ` Yann E. MORIN
2018-05-03 19:56 ` Thomas Petazzoni
2018-05-03 20:04   ` Yann E. MORIN
2018-05-06 16:19     ` Stefan Becker
2018-05-07 15:00       ` M ZV
2018-05-08 21:37         ` Arnout Vandecappelle
2018-05-09 20:22           ` Yann E. MORIN
2018-05-10 16:02             ` M ZV
2018-05-29  7:37             ` Peter Korsgaard
2018-05-30 15:31               ` Yann E. MORIN
2018-05-30 16:45                 ` Arnout Vandecappelle
2018-06-01 12:58                   ` [Buildroot] [PATCH proposal/next] replace host-mkpasswd Stefan Becker
2018-06-01 12:58                     ` [Buildroot] [PATCH proposal/next 1/2] package/busybox: add host variant Stefan Becker
2018-06-01 13:03                       ` Thomas Petazzoni
2018-06-01 12:59                     ` [Buildroot] [PATCH proposal/next 2/2] package/mkpasswd: remove obsolete package Stefan Becker
2018-06-01 13:30                     ` [Buildroot] [PATCHv2 propsal/next] replace host-mkpasswd Stefan Becker
2018-06-01 13:30                       ` [Buildroot] [PATCHv2 proposal/next 1/3] package/busybox: add host variant Stefan Becker
2018-06-01 13:30                       ` [Buildroot] [PATCHv2 proposal/next 2/3] build: replace host-mkpasswd with host-busybox Stefan Becker
2018-06-04 22:21                         ` Arnout Vandecappelle
2018-06-05 11:22                           ` Carlos Santos
2018-06-05 16:15                             ` Yann E. MORIN
2018-06-05 16:35                               ` Christopher McCrory
2018-06-05 16:50                                 ` Yann E. MORIN
2018-06-07 21:29                                   ` Arnout Vandecappelle
2018-06-08 11:40                                     ` Stefan Becker
2018-06-08 17:13                                       ` Yann E. MORIN
2018-06-05 16:08                           ` Yann E. MORIN
2018-06-18  5:13                             ` Peter Korsgaard
2018-06-18  6:53                               ` Thomas Petazzoni
2018-06-01 13:30                       ` [Buildroot] [PATCHv2 proposal/next 3/3] package/mkpasswd: remove obsolete package Stefan Becker
2018-05-29  6:43     ` [Buildroot] [PATCH] host-mkpasswd: fix crash on Fedora 28 build host Stefan Becker
2018-05-03 21:26 ` Peter Korsgaard

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.