mirror of
https://git.freebsd.org/ports.git
synced 2025-06-22 05:00:30 -04:00
LTTng stands for Linux Trace Toolkit: next generation. It's a modern toolkit for tracing Linux (And now FreeBSD, only userspace now) programs. PR: 216142 Submitted by: mmokhi Reported by: mmokhi Reviewed by: feld, mat Approved by: feld, mat (mentors) Differential Revision: https://reviews.freebsd.org/D9200
34 lines
738 B
C
34 lines
738 B
C
--- src/common/compat/compat-epoll.c.orig 2017-01-13 22:20:45 UTC
|
|
+++ src/common/compat/compat-epoll.c
|
|
@@ -31,7 +31,11 @@
|
|
|
|
#include "poll.h"
|
|
|
|
-unsigned int poll_max_size;
|
|
+unsigned int poll_max_size
|
|
+#if defined(__FreeBSD__)
|
|
+= DEFAULT_POLL_SIZE
|
|
+#endif
|
|
+;
|
|
|
|
/*
|
|
* Resize the epoll events structure of the new size.
|
|
@@ -258,6 +262,7 @@ int compat_epoll_set_max_size(void)
|
|
ssize_t size_ret;
|
|
char buf[64];
|
|
|
|
+#if !defined(__FreeBSD__)
|
|
fd = open(COMPAT_EPOLL_PROC_PATH, O_RDONLY);
|
|
if (fd < 0) {
|
|
retval = -1;
|
|
@@ -282,8 +287,10 @@ end_read:
|
|
PERROR("close");
|
|
}
|
|
end:
|
|
+#endif
|
|
if (!poll_max_size) {
|
|
poll_max_size = DEFAULT_POLL_SIZE;
|
|
+ retval = 0;
|
|
}
|
|
DBG("epoll set max size is %d", poll_max_size);
|
|
return retval;
|