Add compat for getdtablesize, GitHub issue 2406.

This commit is contained in:
Nicholas Marriott
2020-10-07 09:39:43 +01:00
parent 57168f3f59
commit 991d5a9c74
4 changed files with 38 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $OpenBSD: imsg.h,v 1.4 2017/03/24 09:34:12 nicm Exp $ */
/* $OpenBSD: imsg.h,v 1.5 2019/01/20 02:50:03 bcook Exp $ */
/*
* Copyright (c) 2006, 2007 Pierre-Yves Ritschard <pyr@openbsd.org>
@ -21,13 +21,15 @@
#ifndef _IMSG_H_
#define _IMSG_H_
#include <stdint.h>
#define IBUF_READ_SIZE 65535
#define IMSG_HEADER_SIZE sizeof(struct imsg_hdr)
#define MAX_IMSGSIZE 16384
struct ibuf {
TAILQ_ENTRY(ibuf) entry;
u_char *buf;
unsigned char *buf;
size_t size;
size_t max;
size_t wpos;
@ -42,8 +44,8 @@ struct msgbuf {
};
struct ibuf_read {
u_char buf[IBUF_READ_SIZE];
u_char *rptr;
unsigned char buf[IBUF_READ_SIZE];
unsigned char *rptr;
size_t wpos;
};