Skip to content

osx: fix inconsistent use of the macro TARGET_OS_OSX#2222

Merged
yhirose merged 2 commits into
yhirose:masterfrom
sergio-nsk:sergey/ios/1
Aug 26, 2025
Merged

osx: fix inconsistent use of the macro TARGET_OS_OSX#2222
yhirose merged 2 commits into
yhirose:masterfrom
sergio-nsk:sergey/ios/1

Conversation

@sergio-nsk

Copy link
Copy Markdown
Contributor

Fixed the build error on iOS:

httplib.h:3583:3: error: unknown type name 'CFStringRef'
  870 |   CFStringRef hostname_ref = CFStringCreateWithCString(

Note, TARGET_OS_OSX is defined but is 0 when TARGET_OS_IOS is 1,
and vise versa. Hence, TARGET_OS_MAC should have been used, that is
set to 1 for the both targets.

Fixed the build error on iOS:

```
httplib.h:3583:3: error: unknown type name 'CFStringRef'
  870 |   CFStringRef hostname_ref = CFStringCreateWithCString(
```

Note, `TARGET_OS_OSX` is defined but is 0 when `TARGET_OS_IOS` is 1,
and vise versa. Hence, `TARGET_OS_MAC` should have been used, that is
set to 1 for the both targets.
`TARGET_OS_MAC` should have been used, that is set to 1 for all other
targets: OSX, IPHONE (IOS, TV, WATCH, VISION, BRIDGE), SIMULATOR,
DRIVERKIT.
@yhirose yhirose merged commit 3fae5f1 into yhirose:master Aug 26, 2025
10 checks passed
@yhirose

yhirose commented Aug 26, 2025

Copy link
Copy Markdown
Owner

@sergio-nsk thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants