ualarm()は Android バージョンの libc、bionic では実装されていません ( Bionic unistd.hを確認してください)。さらに、ualarm() は廃止されました。
私は Android NDK にアプリケーションを移植しているので、ualarm(999999,999999)に相当するもの、つまりSIGALRM を定期的に(毎秒) 送信するものが必要です。
おそらくtimer_create()で?Bionicで実装されているようです。しかし、マニュアルページの例は本当に簡単ではありません...
Android(NDK)に移植するつもりのコード:
/*
* Set a recurring 1 second timer that will call sigalrm() and switch to
* a new channel.
*/
act.sa_handler = sigalrm_handler;
sigaction (SIGALRM, &act, 0);
ualarm(CHANNEL_INTERVAL, CHANNEL_INTERVAL);
change_channel(1);
/* Whenever a SIGALRM is thrown, go to the next 802.11 channel */
void sigalrm_handler(int x)
{
next_channel();
}