1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 07:37:35 +00:00

LibCore: Fix building LibCore on FreeBSD

This commit is contained in:
Gunnar Beutner 2021-06-07 10:12:58 +02:00 committed by Andreas Kling
parent a8ccc9580d
commit 764a41e284
2 changed files with 19 additions and 16 deletions

View file

@ -11,15 +11,20 @@
#include <AK/Types.h>
#include <AK/Vector.h>
#include <pwd.h>
#ifndef AK_OS_MACOS
#ifndef AK_OS_BSD_GENERIC
# include <shadow.h>
#else
# include <LibC/shadow.h>
#endif
#include <sys/types.h>
namespace Core {
#ifdef AK_OS_BSD_GENERIC
struct spwd {
char* sp_namp;
char* sp_pwdp;
};
#endif
class Account {
public:
static Result<Account, String> from_name(const char* username);
@ -56,7 +61,7 @@ private:
Account(const passwd& pwd, const spwd& spwd, Vector<gid_t> extra_gids);
String generate_passwd_file() const;
#ifndef AK_OS_MACOS
#ifndef AK_OS_BSD_GENERIC
String generate_shadow_file() const;
#endif