You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to android-porting
Hi, all!
I'm recently trying to port a x86 linux application to Android
platform, using android-ndk 1.6 and ndk wrapper. When compiling the
codes I met the following problem:
My codes uses usleep() function defined in <unistd.h> and tries to
get
its return value like this:
return usleep(microseconds * 1000);
However, <unistd.h> in x86 system defines usleep as
extern int usleep ( __useconds_t __useconds );
while <unistd.h> in Android NDK defines it as
extern void usleep(unsigned long);
Now I had to change my code as:
usleep( microseconds * 1000 );
return 0;
I'm not sure if it's safe to do so. Does anyone have some idea about
this? Or a better solution?
Thanks very much!
Mundou
Hoegaarden
unread,
Dec 13, 2009, 1:52:45 AM12/13/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to android...@googlegroups.com
I think if your porgram do not have to care about the error returned by usleep, it is OK, but