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

Compilation fails on systems with glibc version < 2.30 #21

Open
Dologan opened this issue Mar 8, 2024 · 2 comments
Open

Compilation fails on systems with glibc version < 2.30 #21

Dologan opened this issue Mar 8, 2024 · 2 comments

Comments

@Dologan
Copy link

Dologan commented Mar 8, 2024

pstack-2.5.1/self.cc: In member function ‘virtual void pstack::Procman::SelfProcess::listLWPs(std::function<void(int)>)’:
pstack-2.5.1/self.cc:31:7: error: ‘gettid’ was not declared in this scope; did you mean ‘getuid’?

This is discussed in
https://stackoverflow.com/questions/30680550/c-gettid-was-not-declared-in-this-scope

And the solution:

#include <sys/syscall.h>
#define gettid() syscall(SYS_gettid)
#endif

fixes the issue

@Dologan
Copy link
Author

Dologan commented Mar 8, 2024

Ah, well, I see now it doesn't support glibc versions < 3.4 anyway, so I guess this is moot.

@Dologan Dologan closed this as completed Mar 8, 2024
@peadar peadar reopened this Mar 10, 2024
@peadar
Copy link
Owner

peadar commented Mar 10, 2024

I can certainly try and make this work for slightly older systems out of the box

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

2 participants