Diego Biurrun writes the following:
int rtc_fd; rtc_fd = open("/dev/rtc", O_RDONLY); rtc_fd = ioctl(rtc_fd, RTC_IRQP_SET, 1024);
If you mean to test whether the ioctl exists, it'd be better to use a smaller number than 1024 or check for EACCES since big numbers might be rejected just because the max_user_freq tuning hasn't been done yet. Also, I'm not sure how this affects your thinking, but omitting the rtc driver is a common mistake made by people compiling their first custom kernel. They'll get an ENODEV here, but if mplayer does the runtime check for rtc anyway, they'll be likely to see the "No such device" error message later (every time mplayer is invoked) and fix the kernel config. "checking for RTC...no" during configure is less likely to be noticed.