What steps will reproduce the problem? 1. Following instructions from http://code.google.com/p/btstack/wiki/GettingStarted 2. ./configure --target=iphone --with-sdk-version=4.2 3. make
What is the expected output? What do you see instead?
Making all in src /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-gcc-4.2.1 -I/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include -I/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/lib/gcc/arm-apple-darwin10/4.2.1/include -F/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/Frameworks -Werror -I../include -o BTdaemon btstack.c hci_cmds.c linked_list.c run_loop.c run_loop_posix.c run_loop_embedded.c run_loop_cocoa.m sdp_util.c socket_connection.c utils.c bt_control_iphone.m daemon.c hci.c hci_dump.c hci_transport_h4.c l2cap.c l2cap_signaling.c remote_device_db_iphone.m platform_iphone.c sdp.c ../SpringBoardAccess/SpringBoardAccess.c -framework CoreFoundation -framework Foundation -F/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/Frameworks -L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/lib -framework Foundation -framework CoreFoundation -framework UIKit -L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/Frameworks/IOKit.framework/Versions/A /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/PrivateFrameworks/BluetoothManager.framework/BluetoothManager -lIOKit -lobjc In file included from /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/mach/mach_types.h:98, from /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/mach/mach.h:66, from daemon.c:85: /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/mach/clock_types.h:84:1: error: "NSEC_PER_USEC" redefined In file included from /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/dispatch/dispatch.h:48, from /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFMessagePort.h:11, from /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:53, from daemon.c:80: /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/dispatch/time.h:51:1: error: this is the location of the previous definition In file included from /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/mach/mach_types.h:98, from /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/mach/mach.h:66, from daemon.c:85: /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/mach/clock_types.h:85:1: error: "USEC_PER_SEC" redefined In file included from /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/dispatch/dispatch.h:48, from /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFMessagePort.h:11, from /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:53, from daemon.c:80: /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/dispatch/time.h:50:1: error: this is the location of the previous definition In file included from /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/mach/mach_types.h:98, from /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/mach/mach.h:66, from daemon.c:85: /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/mach/clock_types.h:86:1: error: "NSEC_PER_SEC" redefined In file included from /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/dispatch/dispatch.h:48, from /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFMessagePort.h:11, from /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:53, from daemon.c:80: /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.2.sdk/usr/include/dispatch/time.h:48:1: error: this is the location of the previous definition make[1]: * [BTdaemon] Error 1 make: * [all-recursive] Error 1
What version of the product are you using? On what operating system? Mac OS 10.6.5 ios sdk 4.2 jailbroken iPod Touch 4G
Please provide any additional information below. The fix applied to issue 82 must also be applied to daemon.c to build for iOS 4.2:
if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_2_0
undef NSEC_PER_USEC
undef USEC_PER_SEC
undef NSEC_PER_SEC
Comment #1
Posted on Jan 6, 2011 by Swift Oxthanks for reporting. that's part of the upcoming power notification handling code (to allow iPhone sleep and wakeup). fixed the compiled problem in r832. BTstack in Cydia is/will always be compiled against SDK 2.0 (that's why I didn't get an error)
Status: Fixed
Labels:
Type-Defect
Priority-Medium