src: add unistd.h import if node posix credentials is defined

usage comment

PR-URL: https://github.com/nodejs/node/pull/54528
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
This commit is contained in:
Jonas 2024-09-20 10:58:02 -04:00 committed by GitHub
parent e35299ae62
commit fd8c762fab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8,6 +8,10 @@
#include "path.h"
#include "zlib.h"
#ifdef NODE_IMPLEMENTS_POSIX_CREDENTIALS
#include <unistd.h> // getuid
#endif
namespace node {
std::string Uint32ToHex(uint32_t crc) {
std::string str;