Commit 2403f72f authored by Sevan Janiyan's avatar Sevan Janiyan Committed by GitHub
Browse files

Include NetBSD in all the BSD if def dances (#289)

parent d9c9c623
......@@ -7288,7 +7288,7 @@ int chilli_main(int argc, char **argv) {
fclose(fp);
fp = NULL;
}
#if defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__)
#if defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__) || defined (__NetBSD__)
if (fork() > 0) {
exit(0);
#else
......@@ -7683,7 +7683,7 @@ int chilli_main(int argc, char **argv) {
}
#endif
#elif defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__)
#elif defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__) || defined (__NetBSD__)
for (i=0; i < MAX_RAWIF && dhcp->rawif[i].fd > 0; i++) {
net_select_reg(&sctx, dhcp->rawif[i].fd, SELECT_READ,
(select_callback)dhcp_receive, dhcp, i);
......
......@@ -1084,7 +1084,7 @@ int dhcp_new(struct dhcp_t **pdhcp, int numconn, int hashsize,
}
#endif
#if defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__)
#if defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__) || defined (__NetBSD__)
{
int blen=0;
if (ioctl(dhcp->rawif[0].fd, BIOCGBLEN, &blen) < 0) {
......@@ -1399,7 +1399,7 @@ void dhcp_free(struct dhcp_t *dhcp) {
struct dhcp_conn_t *conn, *c;
if (!dhcp) return;
#if defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__)
#if defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__) || defined (__NetBSD__)
if (dhcp->pb.buf)
free (dhcp->pb.buf);
#endif
......@@ -6343,7 +6343,7 @@ int dhcp_set_cb_disconnect(struct dhcp_t *this,
return 0;
}
#if defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__)
#if defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__) || defined (__NetBSD__)
int dhcp_receive(struct dhcp_t *this, int idx) {
struct bpf_hdr *hdrp;
......
......@@ -206,7 +206,7 @@ struct dhcp_t {
int numconn; /* Maximum number of connections */
#if defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__)
#if defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__) || defined (__NetBSD__)
struct pkt_buffer pb;
#endif
......@@ -302,7 +302,7 @@ int dhcp_relay_decaps(struct dhcp_t *this, int idx);
int dhcp_data_req(struct dhcp_conn_t *conn, struct pkt_buffer *pb, int ethhdr);
uint8_t * dhcp_nexthop(struct dhcp_t *);
#if defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__)
#if defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__) || defined (__NetBSD__)
int dhcp_receive(struct dhcp_t *this, int idx);
#endif
......
......@@ -658,7 +658,7 @@ int main(int argc, char **argv) {
remote.sun_family = AF_UNIX;
strlcpy(remote.sun_path, cmdsock, sizeof(remote.sun_path));
#if defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__)
#if defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__) || defined (__NetBSD__)
remote.sun_len = strlen(remote.sun_path) + 1;
#endif
......
......@@ -183,7 +183,7 @@ sock_redir_getstate(struct redir_t *redir,
remote.sun_family = AF_UNIX;
strlcpy(remote.sun_path, filedest, sizeof(remote.sun_path));
#if defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__)
#if defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__) || defined (__NetBSD__)
remote.sun_len = strlen(remote.sun_path) + 1;
#endif
......
......@@ -3231,7 +3231,7 @@ int redir_send_msg(struct redir_t *this, struct redir_msg_t *msg) {
strlcpy(remote.sun_path, filedest,
sizeof(remote.sun_path));
#if defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__)
#if defined (__FreeBSD__) || defined (__APPLE__) || defined (__OpenBSD__) || defined (__NetBSD__)
remote.sun_len = strlen(remote.sun_path) + 1;
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment