]> git.saurik.com Git - apple/xnu.git/blobdiff - bsd/netinet6/ipsec.h
xnu-4570.1.46.tar.gz
[apple/xnu.git] / bsd / netinet6 / ipsec.h
index 823bab27eccb006d0e2aecc0833bd3063c4e4510..8d0e6dd51e0c19581afb0c723e173a1b4bc0cfc7 100644 (file)
@@ -290,8 +290,13 @@ struct ipsecstat {
        { "esp_randpad", CTLTYPE_INT }, \
 }
 
+#if defined(__ARM__)
+#define IPSEC_IS_P2ALIGNED(p)        IS_P2ALIGNED(p, sizeof (u_int32_t))
+#define IPSEC_GET_P2UNALIGNED_OFS(p) (sizeof(u_int32_t) - (((uintptr_t)(p)) & ((uintptr_t)(sizeof(u_int32_t)) - 1)))
+#else
 #define IPSEC_IS_P2ALIGNED(p)        1
 #define IPSEC_GET_P2UNALIGNED_OFS(p) 0
+#endif
 
 struct ipsec_output_state {
        int tunneled;