mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 10:57:36 +00:00
LibCore: Fix building LibCore on FreeBSD
This commit is contained in:
parent
a8ccc9580d
commit
764a41e284
2 changed files with 19 additions and 16 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue