#include "if-options.h"
#include "net.h"
-#define ROUNDUP(a) \
+#ifndef RT_ROUNDUP
+#define RT_ROUNDUP(a) \
((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long))
-#define ADVANCE(x, n) (x += ROUNDUP((n)->sa_len))
+#define RT_ADVANCE(x, n) (x += RT_ROUNDUP((n)->sa_len))
+#endif
/* FIXME: Why do we need to check for sa_family 255 */
#define COPYOUT(sin, sa) \
int retval = 0;
#define ADDSU(_su) { \
- l = ROUNDUP(_su.sa.sa_len); \
+ l = RT_ROUNDUP(_su.sa.sa_len); \
memcpy(bp, &(_su), l); \
bp += l; \
}
inet_ntoa(((struct sockaddr_in *)sa[i])->
sin_addr));
#endif
- ADVANCE(cp, sa[i]);
+ RT_ADVANCE(cp, sa[i]);
} else
sa[i] = NULL;
}