regarding to the man page of crypt_r()
of freeBSD all I need to include is
#define _GNU_SOURCE
#include <crypt.h>
But it doesn't run. I ofcourse also linked -lcrypt
#define _XOPEN_SOURCE
#include <unistd.h>
#define _GNU_SOURCE
#include <crypt.h>
#include "ownstuff"
int CreateUser (some stuff)
{
//struct crypt_data data; Also didn't work
crypt_data data;
char *res;
data.initialized = 0;
res = crypt_r("password", "$6$QX", &data);
return 0;
}
So what's wrong? I don't get it.
EDIT:
Also changing the header part to this:
#define _XOPEN_SOURCE
#include <unistd.h>
#include "ownstuff"
Didn't change anything from the error it self.