Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getuid() needs unistd.h #54519

Open
moubctez opened this issue Aug 23, 2024 · 1 comment · May be fixed by #54528
Open

getuid() needs unistd.h #54519

moubctez opened this issue Aug 23, 2024 · 1 comment · May be fixed by #54528

Comments

@moubctez
Copy link

Version

22.7.0

Platform

Darwin 23.6.0 Darwin Kernel Version 23.6.0: Mon Jul 29 21:13:04 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T6020 arm64
NetBSD 10.99.11 NetBSD 10.99.11 (GENERIC64) #0: Sun Aug  4 09:02:47 CEST 2024  [email protected]:/tmp/pkgsrc/obj.aarch64/sys/arch/evbarm/compile/GENERIC64 evbarm

Subsystem

No response

What steps will reproduce the bug?

Compile 22.7.0 on BSD or Darwin (22.6.0 is fine).

How often does it reproduce? Is there a required condition?

Always

What is the expected behavior? Why is that the expected behavior?

Compiles fine

What do you see instead?

Compilation fails with: ../src/compile_cache.cc:42:31: error: use of undeclared identifier 'getuid'

Additional information

Fix:

--- src/compile_cache.cc.orig	2024-08-23 09:02:08.124809520 +0000
+++ src/compile_cache.cc
@@ -1,5 +1,6 @@
 #include "compile_cache.h"
 #include <string>
+#include <unistd.h>
 #include "debug_utils-inl.h"
 #include "env-inl.h"
 #include "node_file.h"
@RedYetiDev
Copy link
Member

Hi! If you'd like to submit a change, please open a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants