libnatpmp
libnatpmp copied to clipboard
Add build support for iOS
- route.h is not found on later release of iOS SDK.
- route.h is copied from MacOS SDK (from XCode 11.3.1) This commit is to support build for iOS
Possibly more portable or future-proof:
#if __has_include(<net/route.h>)
#include <net/route.h>
#else
#include "route.h"
#endif
and then we don't need <TargetConditionals.h>.
In Xcode 15.3 (about 4 years after 11.3.1),
- lines 86-87 (
rmx_stateandrmx_filler[3]) got combined intormx_filler[4]. - line 109 (
RTF_LLDATA) is removed. - line 130 adds
#define RTF_GLOBAL 0x40000000 - line 133 (
RTF_BITS) is removed. - line 142 adds macros
IS_DYNAMIC_DIRECT_HOSTROUTEandIS_LOCALNET_ROUTE
The rest matches.