Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

64bit ntohtl and htonl in iOS 8 #382

Closed
svendjo opened this issue Oct 13, 2014 · 3 comments
Closed

64bit ntohtl and htonl in iOS 8 #382

svendjo opened this issue Oct 13, 2014 · 3 comments

Comments

@svendjo
Copy link

svendjo commented Oct 13, 2014

We recently moved to XCode 6 / iOS 8 and ran into a problem building WebSocket++. We're on version 0.3.0-alpha4 of the library so it's a bit old.

The issue seems to be that WebSocket++ defines 64 bit versions of ntohtll and htonll. And they don't compile against iOS 8.

websocketpp/common/network.hpp
ntohtll, htonll

I get a compilation error saying "Expected (" on the ntohtll method name.

Deleting the WebSocket++ implementations and using Apple's ntohl & htonl caused runtime errors, so that was not a solution. Instead I just renamed ntohtll -> ntohtllex and htonll -> htonllex in my own branch.

You may want to do some ntohtll, htonll detection in the header before defining your own.

@zaphoyd
Copy link
Owner

zaphoyd commented Oct 14, 2014

This is a known issue that will be fixed soon. The report that the built in apple versions aren't drop in compatible is very helpful.

@zaphoyd
Copy link
Owner

zaphoyd commented Oct 14, 2014

this has been fixed on the development branch

@svendjo
Copy link
Author

svendjo commented Oct 14, 2014

Awesome. Thanks for the quick follow up Peter.

From: Peter Thorson <notifications@github.heygears.commailto:notifications@github.com>
Reply-To: zaphoyd/websocketpp <reply@reply.github.heygears.commailto:reply@reply.github.com>
Date: Tuesday, October 14, 2014 at 5:10 AM
To: zaphoyd/websocketpp <websocketpp@noreply.github.heygears.commailto:websocketpp@noreply.github.com>
Cc: Svend Johannsen <svendjo@amazon.commailto:svendjo@amazon.com>
Subject: Re: [websocketpp] 64bit ntohtl and htonl in iOS 8 (#382)

this has been fixed on the development branch


Reply to this email directly or view it on GitHubhttps://github.com//issues/382#issuecomment-59032534.

jim-wong pushed a commit to yoinc/websocketpp that referenced this issue Oct 21, 2014
…aphoyd#358

This avoids conflicts with OS level macros

Conflicts:
	changelog.md
	test/utility/frame.cpp
@zaphoyd zaphoyd closed this as completed in 2e7a902 Nov 4, 2014
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants