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

[Android] Library fails to compile (at least for old SDK level 21) #216

Closed
jstefanelli opened this issue Apr 17, 2024 · 2 comments
Closed
Labels
build Issues related to building uvgRTP

Comments

@jstefanelli
Copy link
Contributor

Hi,
I've encountered a problem trying to include uvgRTP into my android app. It's been super simple, except for one compilation issue:

uvgrtp/src/hostname.cc:54:9: error: use of undeclared identifier 'getlogin_r'
    if (getlogin_r(username, NAME_MAXLEN) != 0) {

I've fixed it with this commit. Am I doing something wrong in the Cmake configuration? Or is something like what I've done the correct way to handle this?

FYI, I am targeting the minimum SDK level as 21 (Android 5.0) to support some very old devices that we still use.

@jrsnen
Copy link
Member

jrsnen commented Apr 23, 2024

Hi,

We currently don't test for android, but this seems like an android version specific issue. CMake should handle this type of problems without additional configuration, so the problem is probably in the underlying libraries in the specific Android version.

If this type of solution works on all android devices, I wouldn't mind if it is changed. That being said, it would be good to figure out which version requires and only target those. Also, if you want to do a PR, please use #elif instead of making a new #if.

Best Regards,
Joni

@jrsnen jrsnen added the build Issues related to building uvgRTP label May 6, 2024
@tampsa
Copy link
Collaborator

tampsa commented May 13, 2024

Fixed by merging pull request in commit 59351b3

@tampsa tampsa closed this as completed May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues related to building uvgRTP
Projects
None yet
Development

No branches or pull requests

3 participants