mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	epoll on Linux is broken with /dev/null so it needs to be disabled.
Instead of adding another BROKEN_* define, move event_init into osdep-*.c.
This commit is contained in:
		@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: osdep-freebsd.c,v 1.19 2009-08-09 18:00:45 tcunha Exp $ */
 | 
			
		||||
/* $Id: osdep-freebsd.c,v 1.20 2010-12-30 20:41:08 nicm Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net>
 | 
			
		||||
@@ -24,6 +24,7 @@
 | 
			
		||||
 | 
			
		||||
#include <err.h>
 | 
			
		||||
#include <errno.h>
 | 
			
		||||
#include <event.h>
 | 
			
		||||
#include <stdint.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <string.h>
 | 
			
		||||
@@ -31,6 +32,7 @@
 | 
			
		||||
 | 
			
		||||
struct kinfo_proc	*cmp_procs(struct kinfo_proc *, struct kinfo_proc *);
 | 
			
		||||
char			*osdep_get_name(int, char *);
 | 
			
		||||
struct event_base	*osdep_event_init(void);
 | 
			
		||||
 | 
			
		||||
#ifndef nitems
 | 
			
		||||
#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
 | 
			
		||||
@@ -127,3 +129,14 @@ error:
 | 
			
		||||
	free(buf);
 | 
			
		||||
	return (NULL);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
struct event_base *
 | 
			
		||||
osdep_event_init(void)
 | 
			
		||||
{
 | 
			
		||||
	/*
 | 
			
		||||
	 * On some versions of FreeBSD, kqueue doesn't work properly on tty
 | 
			
		||||
	 * file descriptors. This is fixed in recent FreeBSD versions.
 | 
			
		||||
	 */
 | 
			
		||||
	setenv("EVENT_NOKQUEUE", "1", 1);
 | 
			
		||||
	return (event_init());
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user