compat/freebsd11_network: Add arm/mips ALIGNED_POINTER

Change-Id: I39fc6a13bafcb329663e49bf2b0d86edcb795cfa
This commit is contained in:
Alexander von Gluck IV 2018-10-18 12:39:55 -05:00
parent 49223f54a7
commit 81b33e381f
1 changed files with 4 additions and 0 deletions

View File

@ -53,6 +53,10 @@
#define ALIGNED_POINTER(p, t) 1 #define ALIGNED_POINTER(p, t) 1
#elif defined(__powerpc__) #elif defined(__powerpc__)
#define ALIGNED_POINTER(p, t) ((((uintptr_t)(p)) & (sizeof (t) - 1)) == 0) #define ALIGNED_POINTER(p, t) ((((uintptr_t)(p)) & (sizeof (t) - 1)) == 0)
#elif defined(__arm__)
#define ALIGNED_POINTER(p, t) ((((unsigned)(p)) & (sizeof(t) - 1)) == 0)
#elif defined(__mips__)
#define ALIGNED_POINTER(p, t) ((((unsigned long)(p)) & (sizeof (t) - 1)) == 0)
#else #else
#error Need definition of ALIGNED_POINTER for this arch! #error Need definition of ALIGNED_POINTER for this arch!
#endif #endif