Gentoo Archives: gentoo-user

From: Dan Johansson <Dan.Johansson@×××.nu>
To: "gentoo-user@l.g.o" <gentoo-user@l.g.o>
Subject: [gentoo-user] [OT] program compiled with libcrypt on Raspberry PI (running Gentoo) hangs when run
Date: Sun, 26 Jun 2016 16:05:38
Message-Id: 576FFD46.2050001@dmj.nu
1 The following code snippet compiles find but when run it just hangs forever:
2
3 $ cat x.c
4 #include <stdio.h>
5 #include <unistd.h>
6 #include <crypt.h>
7
8 int main() {
9 printf("Running test\n");
10 char *encrypted = crypt("blablabla","ab");
11 if(!encrypted || strcmp(encrypted,"ab.h7fshjf89f")) {
12 printf("Fail\n");
13 } else {
14 printf("OK\n");
15 }
16 }
17
18 $ gcc -o xout x.c -lcrypt
19
20 $ ./xout
21 Running test
22
23 <here the program just hangs and needs to be killed with ^C>
24
25 The same code runs fine on my desktop.
26 Any suggestions what could be my problem?
27
28 --
29 Dan Johansson, <http://www.dmj.nu>
30 ***************************************************
31 This message is printed on 100% recycled electrons!
32 ***************************************************

Attachments

File name MIME type
smime.p7s application/pkcs7-signature

Replies