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

[Improvement] Liblinphone intersects with other libraries with "time.h" inside #207

Open
borvanov opened this issue May 22, 2022 · 0 comments

Comments

@borvanov
Copy link

borvanov commented May 22, 2022

Context

Hi! I'm on my way to implement Linphone SDK into my React-Native Expo application. Me and my team are working on React-Native plugin for the SDK to make the SDK available for cross-platform mobile developers. The implementation is going well but I faced an issue with time.h file include in c-participant-device.h and c-participant.h files. These files includes the standard "time" C library.

The issue

React-Native apps are provided with Folly library. The library is usually installed via CocoaPods (but it doesn't really matter). It contains a file named Time.h under folly/portability directory.

When I try to use Linhpone SDK in my iOS application it tries to resolve #include "time.h" in files above. As a result it imports not the standard library but the "Time.h" file from Folly library.

How to fix the issue

I have a solution for the issue. As liblinphone dependent on standard time library - please change the #include syntax from

#inlcude "time.h"

to

#inlcude <time.h>

With the change above the libliphone library will no longer intersect with any other libraries with "time.h" file inside.

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