Native C-app: how to get sys-error of last operation(errno)?

Discuss porting Android to any device.

Native C-app: how to get sys-error of last operation(errno)?

Postby dmitry » Wed Jul 02, 2008 3:17 pm

Hi, guys!

We are porting our C-application to Android. We have one problem that I can't to solve successfully. The problem is following: linker says
undefined reference to `__errno_location'

When standard glibc is compiling without threads support, the errno variable is just
export int errno;
but in threads version this variable defined as __errno_location function call. But this function doesn't exist in libc.so provided by android.

There is a workaround:
#undef errno
extern int errno;
but it would work incorrect if my application running some threads.

Does anybody know correct way to get system error code using android libc?
ICQ, AIM, MSN and Yahoo is suxx. Use jabber!
JID: dmitry.a.kuzmenko@gmail.com
dmitry
Once Poster
Once Poster
 
Posts: 1
Joined: Wed Jul 02, 2008 2:59 pm
Location: Russia

Top

Return to Porting Android

Who is online

Users browsing this forum: No registered users and 1 guest