From 56a25c4cef1ab9748644b9fc3dcf9aae08529854 Mon Sep 17 00:00:00 2001 From: "matthias.ringwald" Date: Thu, 6 Jan 2011 21:17:32 +0000 Subject: [PATCH] don't enable power notification handling in SVN, work-around compile issue with 4.2 headers (fix for #110) --- src/daemon.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/daemon.c b/src/daemon.c index e304692b9..fd0c0252d 100644 --- a/src/daemon.c +++ b/src/daemon.c @@ -73,7 +73,7 @@ #define DAEMON_NO_CONNECTION_TIMEOUT 20000 -#define HANDLE_POWER_NOTIFICATIONS +// #define HANDLE_POWER_NOTIFICATIONS #ifdef HANDLE_POWER_NOTIFICATIONS @@ -82,6 +82,11 @@ // minimal IOKit #include #if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_2_0 +// compile issue fix with 4.2 headers +#undef NSEC_PER_USEC +#undef USEC_PER_SEC +#undef NSEC_PER_SEC +// end of fix #include #define IOKIT #include @@ -131,8 +136,6 @@ IOReturn IOCancelPowerChange ( io_connect_t kernelPort, long notificationID ); io_connect_t root_port; io_object_t notifier; -#endif - io_connect_t root_port; // a reference to the Root Power Domain IOService void @@ -194,6 +197,7 @@ MySleepCallBack( void * refCon, io_service_t service, natural_t messageType, voi } } #endif +#endif static hci_transport_t * transport;