-/* $OpenBSD: socket.h,v 1.31 2000/02/18 05:21:01 itojun Exp $ */
+/* $OpenBSD: socket.h,v 1.32 2000/03/04 02:34:23 itojun Exp $ */
/* $NetBSD: socket.h,v 1.14 1996/02/09 18:25:36 christos Exp $ */
/*
#ifndef _SYS_SOCKET_H_
#define _SYS_SOCKET_H_
+/*
+ * needed for ALIGNBYTES
+ */
+#include <machine/param.h>
+
/*
* Definitions related to sockets: types, address families, options.
*/
#define CMSG_FIRSTHDR(mhdr) ((struct cmsghdr *)(mhdr)->msg_control)
/* Round len up to next alignment boundary */
-#define CMSG_ALIGN(len) (((len)+sizeof(long)-1) & ~(sizeof(long)-1))
+#define CMSG_ALIGN(len) ALIGN(len)
/* Length of the contents of a control message of length len */
#define CMSG_LEN(len) (CMSG_ALIGN(sizeof(struct cmsghdr)) + (len))