I think if your porgram do not have to care about the error returned by
usleep, it is OK, but

2009/12/12 mundou <[email protected]>

> 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
>
>
> --
> unsubscribe: 
> [email protected]<android-porting%[email protected]>
> website: http://groups.google.com/group/android-porting

-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting

Reply via email to