diff options
author | Renato Westphal <renato@opensourcerouting.org> | 2016-03-01 19:31:28 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-09-23 15:31:09 +0200 |
commit | eac6e3f027356c25a8c8fddf921f769b79945fcc (patch) | |
tree | 69d5a17fb3f95934bafa22f8a3aee28c92780d62 /lib/imsg-buffer.c | |
parent | ldpd: sun is a reserved word on Solaris (diff) | |
download | frr-eac6e3f027356c25a8c8fddf921f769b79945fcc.tar.xz frr-eac6e3f027356c25a8c8fddf921f769b79945fcc.zip |
ldpd: adapt the code for Quagga
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'lib/imsg-buffer.c')
-rw-r--r-- | lib/imsg-buffer.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/lib/imsg-buffer.c b/lib/imsg-buffer.c index 61b2c095a..a486fc17c 100644 --- a/lib/imsg-buffer.c +++ b/lib/imsg-buffer.c @@ -16,17 +16,9 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include <sys/types.h> -#include <sys/queue.h> -#include <sys/socket.h> -#include <sys/uio.h> - -#include <limits.h> -#include <errno.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> +#include <zebra.h> +#include "openbsd-queue.h" #include "imsg.h" int ibuf_realloc(struct ibuf *, size_t); @@ -258,7 +250,7 @@ msgbuf_write(struct msgbuf *msgbuf) cmsg->cmsg_len = CMSG_LEN(sizeof(int)); cmsg->cmsg_level = SOL_SOCKET; cmsg->cmsg_type = SCM_RIGHTS; - *(int *)CMSG_DATA(cmsg) = buf->fd; + memcpy(CMSG_DATA(cmsg), &buf->fd, sizeof(int)); } again: |