3

I am trying to build some code that is originally target at OSX/BSD/Linux for the iPhone. It uses struct rt_msghdr from route.h but as it turns out this header is not available in the iPhone SDK.

Looks like the function tries to find the available bind addresses as a list of struct addrinfo.

Does anyone have a suggestion how to proceed here?

tcurdt
  • 14,518
  • 10
  • 57
  • 72

1 Answers1

4

Copy the header into the project and change the includes to be local, that often works for me.

Grant Paul
  • 5,852
  • 2
  • 33
  • 36
  • Surprisingly (at least to me) that did indeed work. Still odd it's not included in the SDK. But thanks to the pointer! At least I got it compiling now. – tcurdt Jan 08 '10 at 01:14
  • 1
    I noticed that the header was present in the Simulator SDK but not in the iPhone SDK (3.2+). – Laurent Etiemble May 10 '10 at 19:17
  • 1
    Copying `route.h` works well. Strange that it is not a part the iOS SDK. Does copying https://github.com/opensource-apple/xnu/blob/master/bsd/net/route.h into my iOS app and using it as it is require me to do anything in my app for licensing requirements? Or I can use if for free without having to say anything on my app's About page? My app is going to get deployed in US and Europe. – AdeleGoldberg Mar 09 '20 at 13:04