Review Request 127205: Add stubs to allow compilation on Android.

Andreas Cord-Landwehr cordlandwehr at kde.org
Tue Mar 1 07:26:37 UTC 2016



> On März 1, 2016, 12:26 vorm., Aleix Pol Gonzalez wrote:
> > src/lib/CMakeLists.txt, line 116
> > <https://git.reviewboard.kde.org/r/127205/diff/1/?file=445780#file445780line116>
> >
> >     Why does pthread make a difference?

Bionic provides native built-in support for (limited set of) pthread functionality. So no linking is required:

http://mobilepearls.com/labs/native-android-api/#pthreads


> On März 1, 2016, 12:26 vorm., Aleix Pol Gonzalez wrote:
> > src/lib/util/kuser_unix.cpp, line 37
> > <https://git.reviewboard.kde.org/r/127205/diff/1/?file=445781#file445781line37>
> >
> >     In glib they solved it using
> >     __BIONIC__
> >     https://mail.gnome.org/archives/commits-list/2012-November/msg07198.html
> >     
> >     If you look at the pwd.h file Android offers, you can see it says:
> >     ```
> >     #if 0 /* MISSING FROM BIONIC */
> >     int getpwnam_r(const char*, struct passwd*, char*, size_t, struct passwd**);
> >     int getpwuid_r(uid_t, struct passwd*, char*, size_t, struct passwd**);
> >     struct passwd* getpwent(void);
> >     int setpwent(void);
> >     #endif /* MISSING */
> >     ```
> >     So it might make sense.

OK, both works for me. Will change the ifdef to __BIONIC__ then.


- Andreas


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127205/#review92959
-----------------------------------------------------------


On Feb. 28, 2016, 10:14 vorm., Andreas Cord-Landwehr wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127205/
> -----------------------------------------------------------
> 
> (Updated Feb. 28, 2016, 10:14 vorm.)
> 
> 
> Review request for KDE Frameworks, Aleix Pol Gonzalez and Alex Richardson.
> 
> 
> Repository: kcoreaddons
> 
> 
> Description
> -------
> 
> Android's libc implementation lacks several features required by the Unix backend implementation. This patch allows compilation by adding stubs for all missing struct members and functions. Result of this patch is that on Android KUser returns empty GUID and UID lists.
> 
> 
> Diffs
> -----
> 
>   src/lib/CMakeLists.txt cf57f0947f13b126f658774209363480013a2e2a 
>   src/lib/util/kuser_unix.cpp de5acde07f4cb8425f03c455bc55d03dfd2579e9 
> 
> Diff: https://git.reviewboard.kde.org/r/127205/diff/
> 
> 
> Testing
> -------
> 
> Compilation tested on Linux and Android.
> 
> 
> Thanks,
> 
> Andreas Cord-Landwehr
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20160301/b77879c5/attachment.html>


More information about the Kde-frameworks-devel mailing list