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

Build failure on macos #169

Open
star-hengxing opened this issue Aug 23, 2024 · 0 comments
Open

Build failure on macos #169

star-hengxing opened this issue Aug 23, 2024 · 0 comments

Comments

@star-hengxing
Copy link

https://github.com/xmake-io/xmake-repo/actions/runs/10529071455/job/29176023384

/Users/runner/.xmake/cache/packages/2408/m/minio-cpp/v0.3.0/source/src/utils.cc:106:19: error: use of undeclared identifier 'getuid'
  return getpwuid(getuid())->pw_dir;

I make a patch, it work fine on ci.

diff --git a/src/utils.cc b/src/utils.cc
index 05cb8e2..6f16a66 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -24,6 +24,10 @@
 #include <corecrt.h>
 #endif
 
+#ifndef _MSC_VER
+#include <unistd.h>
+#endif
+
 #include <openssl/bio.h>
 #include <openssl/buffer.h>
 #include <openssl/crypto.h>
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

No branches or pull requests

1 participant