Page MenuHomeFreeBSD

D34523.id103732.diff
No OneTemporary

D34523.id103732.diff

Index: Mk/bsd.port.mk
===================================================================
--- Mk/bsd.port.mk
+++ Mk/bsd.port.mk
@@ -40,9 +40,9 @@
# makefile is being used on. Automatically set to
# "FreeBSD," "NetBSD," or "OpenBSD" as appropriate.
# OSREL - The release version of the operating system as a text
-# string (e.g., "12.2").
+# string (e.g., "12.3").
# OSVERSION - The operating system version as a comparable integer;
-# the value of __FreeBSD_version (e.g., 1202000).
+# the value of __FreeBSD_version (e.g., 1203000).
#
# This is the beginning of the list of all variables that need to be
# defined in a port, listed in order that they should be included
@@ -1177,7 +1177,7 @@
.endif
_EXPORTED_VARS+= OSVERSION
-.if (${OPSYS} == FreeBSD && ${OSVERSION} < 1202000) || \
+.if (${OPSYS} == FreeBSD && ${OSVERSION} < 1203000) || \
(${OPSYS} == DragonFly && ${DFLYVERSION} < 400400)
_UNSUPPORTED_SYSTEM_MESSAGE= Ports Collection support for your ${OPSYS} version has ended, and no ports\
are guaranteed to build on this system. Please upgrade to a supported release.
Index: databases/clickhouse/Makefile
===================================================================
--- databases/clickhouse/Makefile
+++ databases/clickhouse/Makefile
@@ -238,7 +238,7 @@
CXX= clang++
.endif
-.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1200057
+.if ${OPSYS} == FreeBSD
SUB_LIST+= LEGACY_LIMITS="@comment " \
MODERN_LIMITS=""
.else
Index: databases/mariadb106-server/Makefile
===================================================================
--- databases/mariadb106-server/Makefile
+++ databases/mariadb106-server/Makefile
@@ -199,7 +199,7 @@
.include <bsd.port.options.mk>
-.if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1200057
+.if ${OPSYS} == FreeBSD
SUB_LIST+= LEGACY_LIMITS="@comment " MODERN_LIMITS=""
.else
SUB_LIST+= LEGACY_LIMITS="" MODERN_LIMITS="@comment "
Index: devel/cvsd/files/cvsd.in
===================================================================
--- devel/cvsd/files/cvsd.in
+++ devel/cvsd/files/cvsd.in
@@ -19,7 +19,6 @@
cvsd_config()
{
- osreldate=`sysctl -n kern.osreldate`
chrootjail=`sed -n 's/^ *RootJail *\([^ ]*\) *$/\1/p' < $cvsd_config`
if [ -z "$chrootjail" ]; then
err 1 "RootJail is not specified in $cvsd_config"
@@ -34,7 +33,7 @@
cvsd_prestart()
{
cvsd_config
- if [ $osreldate -gt 500000 ] && [ "$chrootjail" != "none" ]; then
+ if [ "$chrootjail" != "none" ]; then
mount -t devfs devfs $chrootjail/dev
devfs -m $chrootjail/dev rule apply hide
devfs -m $chrootjail/dev rule apply path null unhide
@@ -45,7 +44,7 @@
cvsd_poststop()
{
- if [ $osreldate -gt 500000 ] && [ "$chrootjail" != "none" ]; then
+ if [ "$chrootjail" != "none" ]; then
umount -t devfs $chrootjail/dev
fi
}
Index: devel/imake/files/patch-imake.c
===================================================================
--- devel/imake/files/patch-imake.c
+++ devel/imake/files/patch-imake.c
@@ -1,4 +1,4 @@
---- imake.c.orig 2013-08-17 10:11:50 UTC
+--- imake.c.orig 2019-03-16 23:26:24 UTC
+++ imake.c
@@ -531,6 +531,14 @@ init(void)
AddCppArg(p);
@@ -15,36 +15,39 @@
if ((p = getenv("IMAKECPP")))
cpp = p;
if ((p = getenv("IMAKEMAKE")))
-@@ -1142,29 +1150,17 @@ get_binary_format(FILE *inFile)
- int mib[2];
- size_t len;
- int osrel = 0;
+@@ -1139,34 +1147,7 @@ get_ld_version(FILE *inFile)
+ static void
+ get_binary_format(FILE *inFile)
+ {
+- int mib[2];
+- size_t len;
+- int osrel = 0;
- FILE *objprog = NULL;
- int iself = 0;
+- int iself = 0;
- char buf[10];
- char cmd[PATH_MAX];
-
- mib[0] = CTL_KERN;
- mib[1] = KERN_OSRELDATE;
- len = sizeof(osrel);
- sysctl(mib, 2, &osrel, &len, NULL, 0);
+-
+- mib[0] = CTL_KERN;
+- mib[1] = KERN_OSRELDATE;
+- len = sizeof(osrel);
+- sysctl(mib, 2, &osrel, &len, NULL, 0);
- if (CrossCompiling) {
- strcpy (cmd, CrossCompileDir);
- strcat (cmd, "/");
- strcat (cmd,"objformat");
- } else
- strcpy (cmd, "objformat");
-
+-
- if (osrel >= 300004 &&
- (objprog = popen(cmd, "r")) != NULL &&
- fgets(buf, sizeof(buf), objprog) != NULL &&
- strncmp(buf, "elf", 3) == 0)
-+ if (osrel < 300004)
-+ iself = 0;
-+ else
- iself = 1;
+- iself = 1;
- if (objprog)
- pclose(objprog);
-
- fprintf(inFile, "#define DefaultToElfFormat %s\n", iself ? "YES" : "NO");
+-
+- fprintf(inFile, "#define DefaultToElfFormat %s\n", iself ? "YES" : "NO");
++ fprintf(inFile, "#define DefaultToElfFormat YES\n");
}
+ #endif
+
Index: japanese/kterm/files/patch-Imakefile
===================================================================
--- japanese/kterm/files/patch-Imakefile
+++ japanese/kterm/files/patch-Imakefile
@@ -17,7 +17,7 @@
/*
* add -DWTMP and -DLASTLOG if you want them.
*/
-@@ -27,9 +37,12 @@ XCOMM $Id: Imakefile,v 6.3 1996/07/12 05:01:03 kagotan
+@@ -27,7 +37,7 @@ XCOMM $Id: Imakefile,v 6.3 1996/07/12 05:01:03 kagotan
OSMAJORVERSION = OSMajorVersion
OSMINORVERSION = OSMinorVersion
@@ -25,13 +25,8 @@
+ MAIN_DEFINES = $(TTYGROUPDEF) $(PUCCPTYDDEF) \
-DOSMAJORVERSION=$(OSMAJORVERSION) \
-DOSMINORVERSION=$(OSMINORVERSION)
-+#if defined(OSRelVersion) && OSRelVersion < 900007
-+ MAIN_DEFINES+= -DUTMP
-+#endif
MISC_DEFINES = /* -DALLOWLOGFILEEXEC */
- XKB_DEFINES = XkbClientDefines
- DEFINES = $(XKB_DEFINES) $(XPOLL_DEF) -DKTERM -DSTATUSLINE -DKEEPALIVE -DWALLPAPER
-@@ -72,7 +85,7 @@ XCOMM $Id: Imakefile,v 6.3 1996/07/12 05:01:03 kagotan
+@@ -72,7 +82,7 @@ XCOMM $Id: Imakefile,v 6.3 1996/07/12 05:01:03 kagotan
#endif
#endif
Index: mail/exim/Makefile
===================================================================
--- mail/exim/Makefile
+++ mail/exim/Makefile
@@ -2,7 +2,7 @@
PORTNAME= exim
PORTVERSION?= ${EXIM_VERSION}
-PORTREVISION?= 1
+PORTREVISION?= 2
CATEGORIES= mail
MASTER_SITES= EXIM:exim
MASTER_SITE_SUBDIR= /exim4/:exim \
@@ -68,7 +68,6 @@
DEBIAN_PATCHES_PREFIX= ${FILESDIR}/debian/75
EXTRA_PATCHES= \
${DEBIAN_PATCHES_PREFIX}_30-Avoid-calling-gettimeofday-select-per-char-for-cmdli.patch:-p1 \
- ${DEBIAN_PATCHES_PREFIX}_38-Convert-all-uses-of-select-to-poll.-Bug-2831.patch:-p1 \
${DEBIAN_PATCHES_PREFIX}_40-Fix-basic-memory-use-for-SPARC.-Bug-2838.patch:-p1
.include <bsd.port.options.mk>
Index: mail/exim/files/debian/75_38-Convert-all-uses-of-select-to-poll.-Bug-2831.patch
===================================================================
--- mail/exim/files/debian/75_38-Convert-all-uses-of-select-to-poll.-Bug-2831.patch
+++ /dev/null
@@ -1,931 +0,0 @@
-From dd19ce4f24eec64177cdcfcf294b8efbb631a24b Mon Sep 17 00:00:00 2001
-From: Jeremy Harris <jgh146exb@wizmail.org>
-Date: Wed, 17 Nov 2021 17:19:54 +0000
-Subject: [PATCH] select() -> poll(). Bug 2831
-
----
- doc/ChangeLog | 8 +++
- src/daemon.c | 126 +++++++++++++++++++-------------------
- src/deliver.c | 54 ++++++++--------
- src/exim.c | 9 +--
- src/expand.c | 6 +-
- src/functions.h | 7 +++
- src/ip.c | 12 +---
- src/malware.c | 6 +-
- src/receive.c | 15 +----
- src/smtp_in.c | 18 +-----
- src/spam.c | 42 ++++---------
- src/transport.c | 4 +-
- src/transports/smtp.c | 37 ++++-------
- 13 files changed, 142 insertions(+), 202 deletions(-)
-
-diff --git a/doc/ChangeLog b/doc/ChangeLog
-index 7f6814d5e..58996c3f8 100644
---- a/doc/ChangeLog
-+++ b/doc/ChangeLog
-@@ -40,6 +40,14 @@ JH/09 Fix macro-definition during "-be" expansion testing. The move to
- write-protected store for macros had not accounted for these runtime
- additions; fix by removing this protection for "-be" mode.
-
-+JH/10 Convert all uses of select() to poll(). FreeBSD 12.2 was found to be
-+ handing out large-numbered file descriptors, violating the usual Unix
-+ assumption (and required by Posix) that the lowest possible number will be
-+ allocated by the kernel when a new one is needed. In the daemon, and any
-+ child procesees, values higher than 1024 (being bigger than FD_SETSIZE)
-+ are not useable for FD_SET() [and hence select()] and overwrite the stack.
-+ Assorted crashes happen.
-+
-
- Exim version 4.95
- -----------------
-diff --git a/src/daemon.c b/src/daemon.c
-index 0b8d5d595..a248a4f40 100644
---- a/src/daemon.c
-+++ b/src/daemon.c
-@@ -87,7 +87,7 @@ sigchld_seen = TRUE;
- }
-
-
--/* SIGTERM handler. Try to get the damon pif file removed
-+/* SIGTERM handler. Try to get the damon pid file removed
- before exiting. */
-
- static void
-@@ -141,7 +141,7 @@ Uunlink(s);
-
- static void
- close_daemon_sockets(int daemon_notifier_fd,
-- int * listen_sockets, int listen_socket_count)
-+ struct pollfd * fd_polls, int listen_socket_count)
- {
- if (daemon_notifier_fd >= 0)
- {
-@@ -152,7 +152,7 @@ if (daemon_notifier_fd >= 0)
- #endif
- }
-
--for (int i = 0; i < listen_socket_count; i++) (void) close(listen_sockets[i]);
-+for (int i = 0; i < listen_socket_count; i++) (void) close(fd_polls[i].fd);
- }
-
-
-@@ -167,7 +167,7 @@ is required so that they can be closed in the sub-process. Take care not to
- leak store in this process - reset the stacking pool at the end.
-
- Arguments:
-- listen_sockets sockets which are listening for incoming calls
-+ fd_polls sockets which are listening for incoming calls
- listen_socket_count count of listening sockets
- accept_socket socket of the current accepted call
- accepted socket information about the current call
-@@ -176,7 +176,7 @@ Returns: nothing
- */
-
- static void
--handle_smtp_call(int *listen_sockets, int listen_socket_count,
-+handle_smtp_call(struct pollfd *fd_polls, int listen_socket_count,
- int accept_socket, struct sockaddr *accepted)
- {
- pid_t pid;
-@@ -459,7 +459,7 @@ if (pid == 0)
- extensive comment before the reception loop in exim.c for a fuller
- explanation of this logic. */
-
-- close_daemon_sockets(daemon_notifier_fd, listen_sockets, listen_socket_count);
-+ close_daemon_sockets(daemon_notifier_fd, fd_polls, listen_socket_count);
-
- /* Set FD_CLOEXEC on the SMTP socket. We don't want any rogue child processes
- to be able to communicate with them, under any circumstances. */
-@@ -1305,13 +1305,6 @@ return FALSE;
-
-
-
--static void
--add_listener_socket(int fd, fd_set * fds, int * fd_max)
--{
--FD_SET(fd, fds);
--if (fd > *fd_max) *fd_max = fd;
--}
--
- /*************************************************
- * Exim Daemon Mainline *
- *************************************************/
-@@ -1339,9 +1332,8 @@ void
- daemon_go(void)
- {
- struct passwd * pw;
--int * listen_sockets = NULL;
--int listen_socket_count = 0, listen_fd_max = 0;
--fd_set select_listen;
-+struct pollfd * fd_polls, * tls_watch_poll = NULL, * dnotify_poll = NULL;
-+int listen_socket_count = 0, poll_fd_count;
- ip_address_item * addresses = NULL;
- time_t last_connection_time = (time_t)0;
- int local_queue_run_max = atoi(CS expand_string(queue_run_max));
-@@ -1353,17 +1345,21 @@ debugging lines get the pid added. */
-
- DEBUG(D_any|D_v) debug_selector |= D_pid;
-
--FD_ZERO(&select_listen);
-+/* Allocate enough pollstructs for inetd mode plus the ancillary sockets;
-+also used when there are no listen sockets. */
-+
-+fd_polls = store_get(sizeof(struct pollfd) * 3, FALSE);
-+
- if (f.inetd_wait_mode)
- {
- listen_socket_count = 1;
-- listen_sockets = store_get(sizeof(int), FALSE);
- (void) close(3);
- if (dup2(0, 3) == -1)
- log_write(0, LOG_MAIN|LOG_PANIC_DIE,
- "failed to dup inetd socket safely away: %s", strerror(errno));
-
-- listen_sockets[0] = 3;
-+ fd_polls[0].fd = 3;
-+ fd_polls[0].events = POLLIN;
- (void) close(0);
- (void) close(1);
- (void) close(2);
-@@ -1390,9 +1386,6 @@ if (f.inetd_wait_mode)
- if (setsockopt(3, IPPROTO_TCP, TCP_NODELAY, US &on, sizeof(on)))
- log_write(0, LOG_MAIN|LOG_PANIC_DIE, "failed to set socket NODELAY: %s",
- strerror(errno));
--
-- FD_SET(3, &select_listen);
-- listen_fd_max = 3;
- }
-
-
-@@ -1686,11 +1679,16 @@ if (f.daemon_listen && !f.inetd_wait_mode)
- }
- }
-
-- /* Get a vector to remember all the sockets in */
-+ /* Get a vector to remember all the sockets in.
-+ Two extra elements for the ancillary sockets */
-
- for (ipa = addresses; ipa; ipa = ipa->next)
- listen_socket_count++;
-- listen_sockets = store_get(sizeof(int) * listen_socket_count, FALSE);
-+ fd_polls = store_get(sizeof(struct pollfd) * (listen_socket_count + 2),
-+ FALSE);
-+ for (struct pollfd * p = fd_polls; p < fd_polls + listen_socket_count + 2;
-+ p++)
-+ { p->fd = -1; p->events = POLLIN; }
-
- } /* daemon_listen but not inetd_wait_mode */
-
-@@ -1795,7 +1793,7 @@ if (f.daemon_listen && !f.inetd_wait_mode)
- wildcard = ipa->address[0] == 0;
- }
-
-- if ((listen_sockets[sk] = fd = ip_socket(SOCK_STREAM, af)) < 0)
-+ if ((fd_polls[sk].fd = fd = ip_socket(SOCK_STREAM, af)) < 0)
- {
- if (check_special_case(0, addresses, ipa, FALSE))
- {
-@@ -1804,7 +1802,7 @@ if (f.daemon_listen && !f.inetd_wait_mode)
- goto SKIP_SOCKET;
- }
- log_write(0, LOG_PANIC_DIE, "IPv%c socket creation failed: %s",
-- (af == AF_INET6)? '6' : '4', strerror(errno));
-+ af == AF_INET6 ? '6' : '4', strerror(errno));
- }
-
- /* If this is an IPv6 wildcard socket, set IPV6_V6ONLY if that option is
-@@ -1903,8 +1901,7 @@ if (f.daemon_listen && !f.inetd_wait_mode)
- f.tcp_fastopen_ok = FALSE;
- }
- #endif
--
-- add_listener_socket(fd, &select_listen, &listen_fd_max);
-+ fd_polls[sk].fd = fd;
- continue;
- }
-
-@@ -2187,14 +2184,21 @@ tls_daemon_init();
-
- /* Add ancillary sockets to the set for select */
-
-+poll_fd_count = listen_socket_count;
- #ifndef DISABLE_TLS
- if (tls_watch_fd >= 0)
-- add_listener_socket(tls_watch_fd, &select_listen, &listen_fd_max);
-+ {
-+ tls_watch_poll = &fd_polls[poll_fd_count++];
-+ tls_watch_poll->fd = tls_watch_fd;
-+ tls_watch_poll->events = POLLIN;
-+ }
- #endif
- if (daemon_notifier_fd >= 0)
-- add_listener_socket(daemon_notifier_fd, &select_listen, &listen_fd_max);
--
--listen_fd_max++;
-+ {
-+ dnotify_poll = &fd_polls[poll_fd_count++];
-+ dnotify_poll->fd = daemon_notifier_fd;
-+ dnotify_poll->events = POLLIN;
-+ }
-
- /* Close the log so it can be renamed and moved. In the few cases below where
- this long-running process writes to the log (always exceptional conditions), it
-@@ -2293,7 +2297,7 @@ for (;;)
- /* Close any open listening sockets in the child */
-
- close_daemon_sockets(daemon_notifier_fd,
-- listen_sockets, listen_socket_count);
-+ fd_polls, listen_socket_count);
-
- /* Reset SIGHUP and SIGCHLD in the child in both cases. */
-
-@@ -2421,9 +2425,8 @@ for (;;)
-
- if (f.daemon_listen)
- {
-- int check_lsk = 0, lcount;
-+ int lcount;
- BOOL select_failed = FALSE;
-- fd_set fds = select_listen;
-
- DEBUG(D_any) debug_printf("Listening...\n");
-
-@@ -2440,8 +2443,7 @@ for (;;)
- errno = EINTR;
- }
- else
-- lcount = select(listen_fd_max, (SELECT_ARG2_TYPE *)&fds,
-- NULL, NULL, NULL);
-+ lcount = poll(fd_polls, poll_fd_count, -1);
-
- if (lcount < 0)
- {
-@@ -2461,15 +2463,15 @@ for (;;)
- handle_ending_processes();
-
- #ifndef DISABLE_TLS
-+ {
-+ int old_tfd;
- /* Create or rotate any required keys; handle (delayed) filewatch event */
-- for (int old_tfd = tls_daemon_tick(); old_tfd >= 0; )
-- {
-- FD_CLR(old_tfd, &select_listen);
-- if (old_tfd == listen_fd_max - 1) listen_fd_max = old_tfd;
-- if (tls_watch_fd >= 0)
-- add_listener_socket(tls_watch_fd, &select_listen, &listen_fd_max);
-- break;
-- }
-+
-+ if ((old_tfd = tls_daemon_tick()) >= 0)
-+ for (struct pollfd * p = &fd_polls[listen_socket_count];
-+ p < fd_polls + poll_fd_count; p++)
-+ if (p->fd == old_tfd) { p->fd = tls_watch_fd ; break; }
-+ }
- #endif
- errno = select_errno;
- }
-@@ -2490,22 +2492,23 @@ for (;;)
- if (!select_failed)
- {
- #if !defined(DISABLE_TLS) && (defined(EXIM_HAVE_INOTIFY) || defined(EXIM_HAVE_KEVENT))
-- if (tls_watch_fd >= 0 && FD_ISSET(tls_watch_fd, &fds))
-+ if (tls_watch_poll && tls_watch_poll->revents & POLLIN)
- {
-+ tls_watch_poll->revents = 0;
- tls_watch_trigger_time = time(NULL); /* Set up delayed event */
- tls_watch_discard_event(tls_watch_fd);
- break; /* to top of daemon loop */
- }
- #endif
-- if (daemon_notifier_fd >= 0 && FD_ISSET(daemon_notifier_fd, &fds))
-+ if (dnotify_poll && dnotify_poll->revents & POLLIN)
- {
-+ dnotify_poll->revents = 0;
- sigalrm_seen = daemon_notification();
- break; /* to top of daemon loop */
- }
-- while (check_lsk < listen_socket_count)
-- {
-- int lfd = listen_sockets[check_lsk++];
-- if (FD_ISSET(lfd, &fds))
-+ for (struct pollfd * p = fd_polls; p < fd_polls + listen_socket_count;
-+ p++)
-+ if (p->revents & POLLIN)
- {
- EXIM_SOCKLEN_T alen = sizeof(accepted);
- #ifdef TCP_INFO
-@@ -2516,23 +2519,23 @@ for (;;)
-
- smtp_listen_backlog = 0;
- if ( smtp_backlog_monitor > 0
-- && getsockopt(lfd, IPPROTO_TCP, TCP_INFO, &ti, &tlen) == 0)
-+ && getsockopt(p->fd, IPPROTO_TCP, TCP_INFO, &ti, &tlen) == 0)
- {
- # ifdef EXIM_HAVE_TCPI_UNACKED
- DEBUG(D_interface) debug_printf("listen fd %d queue max %u curr %u\n",
-- lfd, ti.tcpi_sacked, ti.tcpi_unacked);
-+ p->fd, ti.tcpi_sacked, ti.tcpi_unacked);
- smtp_listen_backlog = ti.tcpi_unacked;
- # elif defined(__FreeBSD__) /* This does not work. Investigate kernel sourcecode. */
- DEBUG(D_interface) debug_printf("listen fd %d queue max %u curr %u\n",
-- lfd, ti.__tcpi_sacked, ti.__tcpi_unacked);
-+ p->fd, ti.__tcpi_sacked, ti.__tcpi_unacked);
- smtp_listen_backlog = ti.__tcpi_unacked;
- # endif
- }
- #endif
-- accept_socket = accept(lfd, (struct sockaddr *)&accepted, &alen);
-+ p->revents = 0;
-+ accept_socket = accept(p->fd, (struct sockaddr *)&accepted, &alen);
- break;
- }
-- }
- }
-
- /* If select or accept has failed and this was not caused by an
-@@ -2591,7 +2594,7 @@ for (;;)
- #endif
- if (inetd_wait_timeout)
- last_connection_time = time(NULL);
-- handle_smtp_call(listen_sockets, listen_socket_count, accept_socket,
-+ handle_smtp_call(fd_polls, listen_socket_count, accept_socket,
- (struct sockaddr *)&accepted);
- }
- }
-@@ -2606,10 +2609,8 @@ for (;;)
-
- else
- {
-- struct timeval tv;
-- tv.tv_sec = queue_interval;
-- tv.tv_usec = 0;
-- select(0, NULL, NULL, NULL, &tv);
-+ struct pollfd p;
-+ poll(&p, 0, queue_interval * 1000);
- handle_ending_processes();
- }
-
-@@ -2634,8 +2635,7 @@ for (;;)
- {
- log_write(0, LOG_MAIN, "pid %d: SIGHUP received: re-exec daemon",
- getpid());
-- close_daemon_sockets(daemon_notifier_fd,
-- listen_sockets, listen_socket_count);
-+ close_daemon_sockets(daemon_notifier_fd, fd_polls, listen_socket_count);
- ALARM_CLR(0);
- signal(SIGHUP, SIG_IGN);
- sighup_argv[0] = exim_path;
-diff --git a/src/deliver.c b/src/deliver.c
-index 4594c4a1d..8aad811c6 100644
---- a/src/deliver.c
-+++ b/src/deliver.c
-@@ -74,6 +74,7 @@ static BOOL update_spool;
- static BOOL remove_journal;
- static int parcount = 0;
- static pardata *parlist = NULL;
-+static struct pollfd *parpoll;
- static int return_count;
- static uschar *frozen_info = US"";
- static uschar *used_return_path = NULL;
-@@ -3306,7 +3307,7 @@ BOOL done = p->done;
-
- /* Loop through all items, reading from the pipe when necessary. The pipe
- used to be non-blocking. But I do not see a reason for using non-blocking I/O
--here, as the preceding select() tells us, if data is available for reading.
-+here, as the preceding poll() tells us, if data is available for reading.
-
- A read() on a "selected" handle should never block, but(!) it may return
- less data then we expected. (The buffer size we pass to read() shouldn't be
-@@ -3840,7 +3841,7 @@ static address_item *
- par_wait(void)
- {
- int poffset, status;
--address_item *addr, *addrlist;
-+address_item * addr, * addrlist;
- pid_t pid;
-
- set_process_info("delivering %s: waiting for a remote delivery subprocess "
-@@ -3850,18 +3851,18 @@ set_process_info("delivering %s: waiting for a remote delivery subprocess "
- existence - in which case give an error return. We cannot proceed just by
- waiting for a completion, because a subprocess may have filled up its pipe, and
- be waiting for it to be emptied. Therefore, if no processes have finished, we
--wait for one of the pipes to acquire some data by calling select(), with a
-+wait for one of the pipes to acquire some data by calling poll(), with a
- timeout just in case.
-
- The simple approach is just to iterate after reading data from a ready pipe.
- This leads to non-ideal behaviour when the subprocess has written its final Z
- item, closed the pipe, and is in the process of exiting (the common case). A
--call to waitpid() yields nothing completed, but select() shows the pipe ready -
-+call to waitpid() yields nothing completed, but poll() shows the pipe ready -
- reading it yields EOF, so you end up with busy-waiting until the subprocess has
- actually finished.
-
- To avoid this, if all the data that is needed has been read from a subprocess
--after select(), an explicit wait() for it is done. We know that all it is doing
-+after poll(), an explicit wait() for it is done. We know that all it is doing
- is writing to the pipe and then exiting, so the wait should not be long.
-
- The non-blocking waitpid() is to some extent just insurance; if we could
-@@ -3881,9 +3882,7 @@ for (;;) /* Normally we do not repeat this loop */
- {
- while ((pid = waitpid(-1, &status, WNOHANG)) <= 0)
- {
-- struct timeval tv;
-- fd_set select_pipes;
-- int maxpipe, readycount;
-+ int readycount;
-
- /* A return value of -1 can mean several things. If errno != ECHILD, it
- either means invalid options (which we discount), or that this process was
-@@ -3907,7 +3906,7 @@ for (;;) /* Normally we do not repeat this loop */
- subprocesses are still in existence. If kill() gives an OK return, we know
- it must be for one of our processes - it can't be for a re-use of the pid,
- because if our process had finished, waitpid() would have found it. If any
-- of our subprocesses are in existence, we proceed to use select() as if
-+ of our subprocesses are in existence, we proceed to use poll() as if
- waitpid() had returned zero. I think this is safe. */
-
- if (pid < 0)
-@@ -3931,7 +3930,7 @@ for (;;) /* Normally we do not repeat this loop */
- if (poffset >= remote_max_parallel)
- {
- DEBUG(D_deliver) debug_printf("*** no delivery children found\n");
-- return NULL; /* This is the error return */
-+ return NULL; /* This is the error return */
- }
- }
-
-@@ -3940,28 +3939,23 @@ for (;;) /* Normally we do not repeat this loop */
- subprocess, but there are no completed subprocesses. See if any pipes are
- ready with any data for reading. */
-
-- DEBUG(D_deliver) debug_printf("selecting on subprocess pipes\n");
-+ DEBUG(D_deliver) debug_printf("polling subprocess pipes\n");
-
-- maxpipe = 0;
-- FD_ZERO(&select_pipes);
- for (poffset = 0; poffset < remote_max_parallel; poffset++)
- if (parlist[poffset].pid != 0)
-- {
-- int fd = parlist[poffset].fd;
-- FD_SET(fd, &select_pipes);
-- if (fd > maxpipe) maxpipe = fd;
-- }
-+ {
-+ parpoll[poffset].fd = parlist[poffset].fd;
-+ parpoll[poffset].events = POLLIN;
-+ }
-+ else
-+ parpoll[poffset].fd = -1;
-
- /* Stick in a 60-second timeout, just in case. */
-
-- tv.tv_sec = 60;
-- tv.tv_usec = 0;
--
-- readycount = select(maxpipe + 1, (SELECT_ARG2_TYPE *)&select_pipes,
-- NULL, NULL, &tv);
-+ readycount = poll(parpoll, remote_max_parallel, 60 * 1000);
-
- /* Scan through the pipes and read any that are ready; use the count
-- returned by select() to stop when there are no more. Select() can return
-+ returned by poll() to stop when there are no more. Select() can return
- with no processes (e.g. if interrupted). This shouldn't matter.
-
- If par_read_pipe() returns TRUE, it means that either the terminating Z was
-@@ -3978,7 +3972,7 @@ for (;;) /* Normally we do not repeat this loop */
- poffset++)
- {
- if ( (pid = parlist[poffset].pid) != 0
-- && FD_ISSET(parlist[poffset].fd, &select_pipes)
-+ && parpoll[poffset].revents
- )
- {
- readycount--;
-@@ -4016,7 +4010,7 @@ for (;;) /* Normally we do not repeat this loop */
- "transport process list", pid);
- } /* End of the "for" loop */
-
--/* Come here when all the data was completely read after a select(), and
-+/* Come here when all the data was completely read after a poll(), and
- the process in pid has been wait()ed for. */
-
- PROCESS_DONE:
-@@ -4051,7 +4045,7 @@ if ((status & 0xffff) != 0)
- "%s %d",
- addrlist->transport->driver_name,
- status,
-- (msb == 0)? "terminated by signal" : "exit code",
-+ msb == 0 ? "terminated by signal" : "exit code",
- code);
-
- if (msb != 0 || (code != SIGTERM && code != SIGKILL && code != SIGQUIT))
-@@ -4069,7 +4063,8 @@ if ((status & 0xffff) != 0)
- /* Else complete reading the pipe to get the result of the delivery, if all
- the data has not yet been obtained. */
-
--else if (!parlist[poffset].done) (void)par_read_pipe(poffset, TRUE);
-+else if (!parlist[poffset].done)
-+ (void) par_read_pipe(poffset, TRUE);
-
- /* Put the data count and return path into globals, mark the data slot unused,
- decrement the count of subprocesses, and return the address chain. */
-@@ -4218,6 +4213,7 @@ if (!parlist)
- parlist = store_get(remote_max_parallel * sizeof(pardata), FALSE);
- for (poffset = 0; poffset < remote_max_parallel; poffset++)
- parlist[poffset].pid = 0;
-+ parpoll = store_get(remote_max_parallel * sizeof(struct pollfd), FALSE);
- }
-
- /* Now loop for each remote delivery */
-@@ -4613,7 +4609,7 @@ nonmatch domains
- that it can use either of them, though it prefers O_NONBLOCK, which
- distinguishes between EOF and no-more-data. */
-
--/* The data appears in a timely manner and we already did a select on
-+/* The data appears in a timely manner and we already did a poll on
- all pipes, so I do not see a reason to use non-blocking IO here
-
- #ifdef O_NONBLOCK
-diff --git a/src/exim.c b/src/exim.c
-index 133761de9..42db457c0 100644
---- a/src/exim.c
-+++ b/src/exim.c
-@@ -5735,13 +5735,8 @@ for (BOOL more = TRUE; more; )
- the file copy. */
-
- if (!receive_timeout)
-- {
-- struct timeval t = { .tv_sec = 30*60, .tv_usec = 0 }; /* 30 minutes */
-- fd_set r;
--
-- FD_ZERO(&r); FD_SET(0, &r);
-- if (select(1, &r, NULL, NULL, &t) == 0) mainlog_close();
-- }
-+ if (poll_one_fd(0, POLLIN, 30*60*1000) == 0) /* 30 minutes */
-+ mainlog_close();
-
- /* Read the data for the message. If filter_test is not FTEST_NONE, this
- will just read the headers for the message, and not write anything onto the
-diff --git a/src/expand.c b/src/expand.c
-index 59554840e..bfae2a3c0 100644
---- a/src/expand.c
-+++ b/src/expand.c
-@@ -1760,8 +1760,6 @@ const uschar * where;
- #ifndef EXIM_HAVE_ABSTRACT_UNIX_SOCKETS
- uschar * sname;
- #endif
--fd_set fds;
--struct timeval tv;
-
- if ((fd = socket(AF_UNIX, SOCK_DGRAM, 0)) < 0)
- {
-@@ -1805,9 +1803,7 @@ if (connect(fd, (const struct sockaddr *)&sa_un, len) < 0)
- buf[0] = NOTIFY_QUEUE_SIZE_REQ;
- if (send(fd, buf, 1, 0) < 0) { where = US"send"; goto bad; }
-
--FD_ZERO(&fds); FD_SET(fd, &fds);
--tv.tv_sec = 2; tv.tv_usec = 0;
--if (select(fd + 1, (SELECT_ARG2_TYPE *)&fds, NULL, NULL, &tv) != 1)
-+if (poll_one_fd(fd, POLLIN, 2 * 1000) != 1)
- {
- DEBUG(D_expand) debug_printf("no daemon response; using local evaluation\n");
- len = snprintf(CS buf, sizeof(buf), "%u", queue_count_cached());
-diff --git a/src/functions.h b/src/functions.h
-index 3dd890a00..0cf80dfbb 100644
---- a/src/functions.h
-+++ b/src/functions.h
-@@ -1255,6 +1255,13 @@ child_open(uschar **argv, uschar **envp, int newumask, int *infdptr,
- outfdptr, make_leader, purpose);
- }
-
-+static inline int
-+poll_one_fd(int fd, short pollbits, int tmo_millisec)
-+{
-+struct pollfd p = {.fd = fd, .events = pollbits};
-+return poll(&p, 1, tmo_millisec);
-+}
-+
- # endif /* !COMPILE_UTILITY */
-
- /******************************************************************************/
-diff --git a/src/ip.c b/src/ip.c
-index d83d6f910..aa42343fb 100644
---- a/src/ip.c
-+++ b/src/ip.c
-@@ -589,9 +589,7 @@ Returns: TRUE => ready for i/o
- BOOL
- fd_ready(int fd, time_t timelimit)
- {
--fd_set select_inset;
--int time_left = timelimit - time(NULL);
--int rc;
-+int rc, time_left = timelimit - time(NULL);
-
- if (time_left <= 0)
- {
-@@ -602,12 +600,8 @@ if (time_left <= 0)
-
- do
- {
-- struct timeval tv = { .tv_sec = time_left, .tv_usec = 0 };
-- FD_ZERO (&select_inset);
-- FD_SET (fd, &select_inset);
--
- /*DEBUG(D_transport) debug_printf("waiting for data on fd\n");*/
-- rc = select(fd + 1, (SELECT_ARG2_TYPE *)&select_inset, NULL, NULL, &tv);
-+ rc = poll_one_fd(fd, POLLIN, time_left * 1000);
-
- /* If some interrupt arrived, just retry. We presume this to be rare,
- but it can happen (e.g. the SIGUSR1 signal sent by exiwhat causes
-@@ -636,7 +630,7 @@ do
- /* Checking the FD_ISSET is not enough, if we're interrupted, the
- select_inset may still contain the 'input'. */
- }
--while (rc < 0 || !FD_ISSET(fd, &select_inset));
-+while (rc < 0);
- return TRUE;
- }
-
-diff --git a/src/malware.c b/src/malware.c
-index 10a390dfa..d9ab3b9dd 100644
---- a/src/malware.c
-+++ b/src/malware.c
-@@ -277,11 +277,7 @@ int fd = ip_connectedsocket(SOCK_STREAM, hostname, port, port, 5,
- /* Under some fault conditions, FreeBSD 12.2 seen to send a (non-TFO) SYN
- and, getting no response, wait for a long time. Impose a 5s max. */
- if (fd >= 0)
-- {
-- struct timeval tv = {.tv_sec = 5};
-- fd_set fds;
-- FD_ZERO(&fds); FD_SET(fd, &fds); (void) select(fd+1, NULL, &fds, NULL, &tv);
-- }
-+ (void) poll_one_fd(fd, POLLOUT, 5 * 1000);
- #endif
- return fd;
- }
-diff --git a/src/receive.c b/src/receive.c
-index fab0f00c4..3adcbbd88 100644
---- a/src/receive.c
-+++ b/src/receive.c
-@@ -624,12 +624,8 @@ if (!receive_timeout && !receive_hasc())
- if (t.tv_sec > 30*60)
- mainlog_close();
- else
-- {
-- fd_set r;
-- FD_ZERO(&r); FD_SET(0, &r);
-- t.tv_sec = 30*60 - t.tv_sec; t.tv_usec = 0;
-- if (select(1, &r, NULL, NULL, &t) == 0) mainlog_close();
-- }
-+ if (poll_one_fd(0, POLLIN, (30*60 - t.tv_sec) * 1000) == 0)
-+ mainlog_close();
- }
- }
-
-@@ -4234,12 +4230,7 @@ response, but the chance of this happening should be small. */
- if (smtp_input && sender_host_address && !f.sender_host_notsocket &&
- !receive_smtp_buffered())
- {
-- struct timeval tv = {.tv_sec = 0, .tv_usec = 0};
-- fd_set select_check;
-- FD_ZERO(&select_check);
-- FD_SET(fileno(smtp_in), &select_check);
--
-- if (select(fileno(smtp_in) + 1, &select_check, NULL, NULL, &tv) != 0)
-+ if (poll_one_fd(fileno(smtp_in), POLLIN, 0) != 0)
- {
- int c = (receive_getc)(GETC_BUFFER_UNLIMITED);
- if (c != EOF) (receive_ungetc)(c); else
-diff --git a/src/smtp_in.c b/src/smtp_in.c
-index 824178e4d..7cb966f24 100644
---- a/src/smtp_in.c
-+++ b/src/smtp_in.c
-@@ -346,8 +346,6 @@ static BOOL
- wouldblock_reading(void)
- {
- int fd, rc;
--fd_set fds;
--struct timeval tzero = {.tv_sec = 0, .tv_usec = 0};
-
- #ifndef DISABLE_TLS
- if (tls_in.active.sock >= 0)
-@@ -358,9 +356,7 @@ if (smtp_inptr < smtp_inend)
- return FALSE;
-
- fd = fileno(smtp_in);
--FD_ZERO(&fds);
--FD_SET(fd, &fds);
--rc = select(fd + 1, (SELECT_ARG2_TYPE *)&fds, NULL, NULL, &tzero);
-+rc = poll_one_fd(fd, POLLIN, 0);
-
- if (rc <= 0) return TRUE; /* Not ready to read */
- rc = smtp_getc(GETC_BUFFER_UNLIMITED);
-@@ -3942,16 +3938,8 @@ log_write(L_smtp_connection, LOG_MAIN, "%s closed by QUIT",
- /* Pause, hoping client will FIN first so that they get the TIME_WAIT.
- The socket should become readble (though with no data) */
-
-- {
-- int fd = fileno(smtp_in);
-- fd_set fds;
-- struct timeval t_limit = {.tv_sec = 0, .tv_usec = 200*1000};
--
-- FD_ZERO(&fds);
-- FD_SET(fd, &fds);
-- (void) select(fd + 1, (SELECT_ARG2_TYPE *)&fds, NULL, NULL, &t_limit);
-- }
--#endif /*!DAEMON_CLOSE_NOWAIT*/
-+(void) poll_one_fd(fileno(smtp_in), POLLIN, 200);
-+#endif /*!SERVERSIDE_CLOSE_NOWAIT*/
- }
-
-
-diff --git a/src/spam.c b/src/spam.c
-index 470e5fae7..e3316ed96 100644
---- a/src/spam.c
-+++ b/src/spam.c
-@@ -194,12 +194,6 @@ uschar *p,*q;
- int override = 0;
- time_t start;
- size_t read, wrote;
--#ifndef NO_POLL_H
--struct pollfd pollfd;
--#else /* Patch posted by Erik ? for OS X */
--struct timeval select_tv; /* and applied by PH */
--fd_set select_fd;
--#endif
- uschar *spamd_address_work;
- spamd_address_container * sd;
-
-@@ -395,19 +389,19 @@ if (wrote == -1)
- }
-
- /* now send the file */
--/* spamd sometimes accepts connections but doesn't read data off
-- * the connection. We make the file descriptor non-blocking so
-- * that the write will only write sufficient data without blocking
-- * and we poll the descriptor to make sure that we can write without
-- * blocking. Short writes are gracefully handled and if the whole
-- * transaction takes too long it is aborted.
-- * Note: poll() is not supported in OSX 10.2 and is reported to be
-- * broken in more recent versions (up to 10.4).
-+/* spamd sometimes accepts connections but doesn't read data off the connection.
-+We make the file descriptor non-blocking so that the write will only write
-+sufficient data without blocking and we poll the descriptor to make sure that we
-+can write without blocking. Short writes are gracefully handled and if the
-+whole transaction takes too long it is aborted.
-+
-+Note: poll() is not supported in OSX 10.2 and is reported to be broken in more
-+ recent versions (up to 10.4). Workaround using select() removed 2021/11 (jgh).
- */
--#ifndef NO_POLL_H
--pollfd.fd = spamd_cctx.sock;
--pollfd.events = POLLOUT;
-+#ifdef NO_POLL_H
-+# error Need poll(2) support
- #endif
-+
- (void)fcntl(spamd_cctx.sock, F_SETFL, O_NONBLOCK);
- do
- {
-@@ -416,19 +410,7 @@ do
- {
- offset = 0;
- again:
--#ifndef NO_POLL_H
-- result = poll(&pollfd, 1, 1000);
--
--/* Patch posted by Erik ? for OS X and applied by PH */
--#else
-- select_tv.tv_sec = 1;
-- select_tv.tv_usec = 0;
-- FD_ZERO(&select_fd);
-- FD_SET(spamd_cctx.sock, &select_fd);
-- result = select(spamd_cctx.sock+1, NULL, &select_fd, NULL, &select_tv);
--#endif
--/* End Erik's patch */
--
-+ result = poll_one_fd(spamd_cctx.sock, POLLOUT, 1000);
- if (result == -1 && errno == EINTR)
- goto again;
- else if (result < 1)
-diff --git a/src/transport.c b/src/transport.c
-index 8c74030f0..ef523657e 100644
---- a/src/transport.c
-+++ b/src/transport.c
-@@ -253,7 +253,6 @@ for (int i = 0; i < 100; i++)
-
- for(;;)
- {
-- fd_set fds;
- /* This code makes use of alarm() in order to implement the timeout. This
- isn't a very tidy way of doing things. Using non-blocking I/O with select()
- provides a neater approach. However, I don't know how to do this when TLS is
-@@ -281,8 +280,7 @@ for (int i = 0; i < 100; i++)
- if (rc >= 0 || errno != ENOTCONN || connretry <= 0)
- break;
-
-- FD_ZERO(&fds); FD_SET(fd, &fds);
-- select(fd+1, NULL, &fds, NULL, NULL); /* could set timout? */
-+ poll_one_fd(fd, POLLOUT, -1); /* could set timeout? retval check? */
- connretry--;
- }
-
-diff --git a/src/transports/smtp.c b/src/transports/smtp.c
-index d321bd69e..c64bb7010 100644
---- a/src/transports/smtp.c
-+++ b/src/transports/smtp.c
-@@ -3550,8 +3550,8 @@ void
- smtp_proxy_tls(void * ct_ctx, uschar * buf, size_t bsize, int * pfd,
- int timeout)
- {
--fd_set rfds, efds;
--int max_fd = MAX(pfd[0], tls_out.active.sock) + 1;
-+struct pollfd p[2] = {{.fd = tls_out.active.sock, .events = POLLIN},
-+ {.fd = pfd[0], .events = POLLIN}};
- int rc, i;
- BOOL send_tls_shutdown = TRUE;
-
-@@ -3560,23 +3560,16 @@ if ((rc = exim_fork(US"tls-proxy")))
- _exit(rc < 0 ? EXIT_FAILURE : EXIT_SUCCESS);
-
- set_process_info("proxying TLS connection for continued transport");
--FD_ZERO(&rfds);
--FD_SET(tls_out.active.sock, &rfds);
--FD_SET(pfd[0], &rfds);
-
--for (int fd_bits = 3; fd_bits; )
-+do
- {
- time_t time_left = timeout;
- time_t time_start = time(NULL);
-
- /* wait for data */
-- efds = rfds;
- do
- {
-- struct timeval tv = { time_left, 0 };
--
-- rc = select(max_fd,
-- (SELECT_ARG2_TYPE *)&rfds, NULL, (SELECT_ARG2_TYPE *)&efds, &tv);
-+ rc = poll(p, 2, time_left * 1000);
-
- if (rc < 0 && errno == EINTR)
- if ((time_left -= time(NULL) - time_start) > 0) continue;
-@@ -3589,23 +3582,22 @@ for (int fd_bits = 3; fd_bits; )
-
- /* For errors where not readable, bomb out */
-
-- if (FD_ISSET(tls_out.active.sock, &efds) || FD_ISSET(pfd[0], &efds))
-+ if (p[0].revents & POLLERR || p[1].revents & POLLERR)
- {
- DEBUG(D_transport) debug_printf("select: exceptional cond on %s fd\n",
-- FD_ISSET(pfd[0], &efds) ? "proxy" : "tls");
-- if (!(FD_ISSET(tls_out.active.sock, &rfds) || FD_ISSET(pfd[0], &rfds)))
-+ p[0].revents & POLLERR ? "tls" : "proxy");
-+ if (!(p[0].revents & POLLIN || p[1].events & POLLIN))
- goto done;
- DEBUG(D_transport) debug_printf("- but also readable; no exit yet\n");
- }
- }
-- while (rc < 0 || !(FD_ISSET(tls_out.active.sock, &rfds) || FD_ISSET(pfd[0], &rfds)));
-+ while (rc < 0 || !(p[0].revents & POLLIN || p[1].revents & POLLIN));
-
- /* handle inbound data */
-- if (FD_ISSET(tls_out.active.sock, &rfds))
-+ if (p[0].revents & POLLIN)
- if ((rc = tls_read(ct_ctx, buf, bsize)) <= 0) /* Expect -1 for EOF; */
- { /* that reaps the TLS Close Notify record */
-- fd_bits &= ~1;
-- FD_CLR(tls_out.active.sock, &rfds);
-+ p[0].fd = -1;
- shutdown(pfd[0], SHUT_WR);
- timeout = 5;
- }
-@@ -3616,11 +3608,10 @@ for (int fd_bits = 3; fd_bits; )
- /* Handle outbound data. We cannot combine payload and the TLS-close
- due to the limitations of the (pipe) channel feeding us. Maybe use a unix-domain
- socket? */
-- if (FD_ISSET(pfd[0], &rfds))
-+ if (p[1].revents & POLLIN)
- if ((rc = read(pfd[0], buf, bsize)) <= 0)
- {
-- fd_bits &= ~2;
-- FD_CLR(pfd[0], &rfds);
-+ p[1].fd = -1;
-
- # ifdef EXIM_TCP_CORK /* Use _CORK to get TLS Close Notify in FIN segment */
- (void) setsockopt(tls_out.active.sock, IPPROTO_TCP, EXIM_TCP_CORK, US &on, sizeof(on));
-@@ -3633,10 +3624,8 @@ for (int fd_bits = 3; fd_bits; )
- for (int nbytes = 0; rc - nbytes > 0; nbytes += i)
- if ((i = tls_write(ct_ctx, buf + nbytes, rc - nbytes, FALSE)) < 0)
- goto done;
--
-- if (fd_bits & 1) FD_SET(tls_out.active.sock, &rfds);
-- if (fd_bits & 2) FD_SET(pfd[0], &rfds);
- }
-+while (p[0].fd >= 0 || p[1].fd >= 0);
-
- done:
- if (send_tls_shutdown) tls_close(ct_ctx, TLS_SHUTDOWN_NOWAIT);
Index: math/igraph/Makefile
===================================================================
--- math/igraph/Makefile
+++ math/igraph/Makefile
@@ -28,8 +28,7 @@
@${ECHO} ${PORTVERSION} > ${WRKSRC}/IGRAPH_VERSION
.include <bsd.port.pre.mk>
-.if (${OSVERSION} >= 1300000 && ${OSVERSION} < 1300523) || \
- (${OSVERSION} >= 1200000 && ${OSVERSION} < 1203500)
+.if ${OSVERSION} >= 1300000 && ${OSVERSION} < 1300523
EXTRA_PATCHES= ${PATCHDIR}/extra-patch-etc_cmake_compilers.cmake
.endif
Index: misc/freebsd-release-manifests/Makefile
===================================================================
--- misc/freebsd-release-manifests/Makefile
+++ misc/freebsd-release-manifests/Makefile
@@ -1,5 +1,5 @@
PORTNAME= freebsd-release-manifests
-DISTVERSION= 20211207
+DISTVERSION= 20220401
PORTREVISION= 0
CATEGORIES= misc
MASTER_SITES= #
Index: misc/freebsd-release-manifests/files/MANIFESTS/amd64-amd64-12.2-RELEASE
===================================================================
--- misc/freebsd-release-manifests/files/MANIFESTS/amd64-amd64-12.2-RELEASE
+++ /dev/null
@@ -1,9 +0,0 @@
-base-dbg.txz 52c8a88d287334243cbd9f1bd4c0a20bb0ad3fa0ab481f20c220ea821fe7b86b 1649 base_dbg "Base system (Debugging)" off
-base.txz 8bd49ce35c340a04029266fbbe82b1fdfeb914263e39579eecafb2e67d00693a 26343 base "Base system (MANDATORY)" on
-kernel-dbg.txz 1cb3c33b9f004b4f4fbd63bb94dcadc7bf694533401df1b0a04aec14d9e8c7c1 895 kernel_dbg "Kernel (Debugging)" on
-kernel.txz 729584a21f564cf9c1fa7d4a85ab6fa00a8c5370207396fa95d242b0bef750cb 909 kernel "Kernel (MANDATORY)" on
-lib32-dbg.txz 69a5ecee1a8b7571df70778bbbc5b10168f473029a01c3c1c709dac278f4eecf 243 lib32_dbg "32-bit compatibility libraries (Debugging)" off
-lib32.txz 4a31c740a3c929e1cfd774c9d2697d6a775726e3824499b57723640456a1c72a 1009 lib32 "32-bit compatibility libraries" on
-ports.txz 5b9458c4ff8c875e0b80588216b403be79964e7c2cad464828ce8d48da96a81f 177161 ports "Ports tree" off
-src.txz 57f010e034924c2dc9518430d543b05828a0a836376b9522732012f72d054bbd 89277 src "System source tree" off
-tests.txz 05849669220d6c2c61077db79a360b1918200abc5862f67cf6427b57777ac0ec 6075 tests "Test suite" off
Index: misc/freebsd-release-manifests/files/MANIFESTS/arm64-aarch64-12.2-RELEASE
===================================================================
--- misc/freebsd-release-manifests/files/MANIFESTS/arm64-aarch64-12.2-RELEASE
+++ /dev/null
@@ -1,7 +0,0 @@
-base-dbg.txz f4d14f1c3983623adee568f4db701362f4e40a7ea177ffacd0cdad3145507e52 1618 base_dbg "Base system (Debugging)" off
-base.txz 3f82224fbcc6b2a2e1a1358cec5f32c0a08b5c5e6796e1a998369eb624a11cf3 26015 base "Base system (MANDATORY)" on
-kernel-dbg.txz 1094319efc7d0399eefdaf800311244e85cefbe8542ba6402b9eb40a3362f674 626 kernel_dbg "Kernel (Debugging)" on
-kernel.txz 9c1eee72ebfbdf7adc32c386e8ad92c0a646cece58192d541f3d559ee1b4de55 666 kernel "Kernel (MANDATORY)" on
-ports.txz 5b9458c4ff8c875e0b80588216b403be79964e7c2cad464828ce8d48da96a81f 177161 ports "Ports tree" off
-src.txz 57f010e034924c2dc9518430d543b05828a0a836376b9522732012f72d054bbd 89277 src "System source tree" off
-tests.txz fd98a6dbb5cc0242b2e33118c4b6e36864eab2d36916df5f1280a771d963a820 6069 tests "Test suite" off
Index: misc/freebsd-release-manifests/files/MANIFESTS/i386-i386-12.2-RELEASE
===================================================================
--- misc/freebsd-release-manifests/files/MANIFESTS/i386-i386-12.2-RELEASE
+++ /dev/null
@@ -1,7 +0,0 @@
-base-dbg.txz 547c6cb2ff94fde6f384f4d583db519099146e036f21acfcaac0bd7ad03bac59 1647 base_dbg "Base system (Debugging)" off
-base.txz bc333a1f05c13dd00d65025ae4cd8b88daa9c3c4839c331bfae2acafa1e069f5 26334 base "Base system (MANDATORY)" on
-kernel-dbg.txz 0b9d801e8aea18344ead01dd7486452b35cd38b822bc2083e063611949b8858b 886 kernel_dbg "Kernel (Debugging)" on
-kernel.txz d578b60e98b62f3f412068655f365a816e4c8fe9733ea45a9c6d14cb42ff64d4 899 kernel "Kernel (MANDATORY)" on
-ports.txz 5b9458c4ff8c875e0b80588216b403be79964e7c2cad464828ce8d48da96a81f 177161 ports "Ports tree" off
-src.txz 57f010e034924c2dc9518430d543b05828a0a836376b9522732012f72d054bbd 89277 src "System source tree" off
-tests.txz 77272f11632ca5ab9c556da032f6570c25c51ced1deb8240037a9700ecfa862d 6075 tests "Test suite" off
Index: misc/freebsd-release-manifests/files/MANIFESTS/powerpc-powerpc-12.2-RELEASE
===================================================================
--- misc/freebsd-release-manifests/files/MANIFESTS/powerpc-powerpc-12.2-RELEASE
+++ /dev/null
@@ -1,7 +0,0 @@
-base-dbg.txz 8dc12e87097a9698e04efcb5cdc1470918fc39878bd4662214c7b6aeabf5d61d 1604 base_dbg "Base system (Debugging)" off
-base.txz 88524c1037bb6270187d0c64497b6ab5b7c25c573cf1f2c1d992d9870c958d5d 26013 base "Base system (MANDATORY)" on
-kernel-dbg.txz 00a36b0ea7883611b6c1f308b2fde3ddede58cd5e0ee1189fc93041ec904d3d7 609 kernel_dbg "Kernel (Debugging)" on
-kernel.txz 45528926b80b341729b608d535a87403a1bef00e433d0e1c878588027c11a109 623 kernel "Kernel (MANDATORY)" on
-ports.txz 5b9458c4ff8c875e0b80588216b403be79964e7c2cad464828ce8d48da96a81f 177161 ports "Ports tree" off
-src.txz 57f010e034924c2dc9518430d543b05828a0a836376b9522732012f72d054bbd 89277 src "System source tree" off
-tests.txz 9466512b48748dde5a00a2b3141a52bd1396003bb2d1c7f9583efa9ae6761bcf 5951 tests "Test suite" off
Index: misc/freebsd-release-manifests/files/MANIFESTS/powerpc-powerpc64-12.2-RELEASE
===================================================================
--- misc/freebsd-release-manifests/files/MANIFESTS/powerpc-powerpc64-12.2-RELEASE
+++ /dev/null
@@ -1,9 +0,0 @@
-base-dbg.txz 5dcdbc4210e0b6ceb0e63287198dbf5e6cd8a08b0d51466a98cd6f721d7894a7 1612 base_dbg "Base system (Debugging)" off
-base.txz 762ec55a9bd40dc93231e24f2df53c58d90b7cef63892b2740a59f9e8f40898e 26041 base "Base system (MANDATORY)" on
-kernel-dbg.txz 7fa4937ef048f39a1de7febd6578dd5c1582a6d6b241093977513859a147060f 706 kernel_dbg "Kernel (Debugging)" on
-kernel.txz 7d4b33fe45c01ebb0a1c7149427de82fdfe2d2c6feaa1e128276b32404c06bef 720 kernel "Kernel (MANDATORY)" on
-lib32-dbg.txz b4ac510d9056e5e2ca5499471d94609ad861d37a2e999bfac7717c472e2d742a 234 lib32_dbg "32-bit compatibility libraries (Debugging)" off
-lib32.txz ce6c804f48d48c27c9b0eddc6edaebedc48ea473213339fcbd5b3937a607a56c 970 lib32 "32-bit compatibility libraries" on
-ports.txz 5b9458c4ff8c875e0b80588216b403be79964e7c2cad464828ce8d48da96a81f 177161 ports "Ports tree" off
-src.txz 57f010e034924c2dc9518430d543b05828a0a836376b9522732012f72d054bbd 89277 src "System source tree" off
-tests.txz a0b0ae3b3c687ee7cb6007a2ee6663d5141d887f7d97d491d3487b97fc44f49e 5954 tests "Test suite" off
Index: misc/freebsd-release-manifests/files/MANIFESTS/powerpc-powerpcspe-12.2-RELEASE
===================================================================
--- misc/freebsd-release-manifests/files/MANIFESTS/powerpc-powerpcspe-12.2-RELEASE
+++ /dev/null
@@ -1,7 +0,0 @@
-base-dbg.txz 25fe042ae63b393457006bc35c7aafb16da75095df100131daf0d76a766d0874 1603 base_dbg "Base system (Debugging)" off
-base.txz 62fed9954745be0445cd7e3deeda6f9376df57be5354858c28c26a31ed4a50a6 26008 base "Base system (MANDATORY)" on
-kernel-dbg.txz edc510d1b2b265b2eae2bd505db5874e5377da07bd3d1cf3387ace6842ad7a0c 610 kernel_dbg "Kernel (Debugging)" on
-kernel.txz c1724a0f125e63e2292d9d1f4ba878fd9004f3f1f1d19b3d0a79a41df8104b52 624 kernel "Kernel (MANDATORY)" on
-ports.txz 5b9458c4ff8c875e0b80588216b403be79964e7c2cad464828ce8d48da96a81f 177161 ports "Ports tree" off
-src.txz 57f010e034924c2dc9518430d543b05828a0a836376b9522732012f72d054bbd 89277 src "System source tree" off
-tests.txz 7e8a41de5d5af32cbfd6f28e4f02c6f52daf1840c28273337a1dfd0abd817fba 5951 tests "Test suite" off
Index: misc/freebsd-release-manifests/files/MANIFESTS/sparc64-sparc64-12.2-RELEASE
===================================================================
--- misc/freebsd-release-manifests/files/MANIFESTS/sparc64-sparc64-12.2-RELEASE
+++ /dev/null
@@ -1,7 +0,0 @@
-base-dbg.txz c13124a296f1e7c4b8e9360e9eb3fcae4f459020d1d40e147fcfe0f2c0758114 1603 base_dbg "Base system (Debugging)" off
-base.txz a7231de53980621dba77a1b1d495fce73ed638d9d7fad80b28a295dd1e37e43e 25946 base "Base system (MANDATORY)" on
-kernel-dbg.txz c4abfa38ab08e26273d149f2708e6d2cab69018dd54683782bc99f13276ff9d9 592 kernel_dbg "Kernel (Debugging)" on
-kernel.txz 5a0f8c585e4c715042fb7c9f1ce70ce30741e20f8bd69b20886b24b6c06f5ad2 604 kernel "Kernel (MANDATORY)" on
-ports.txz 5b9458c4ff8c875e0b80588216b403be79964e7c2cad464828ce8d48da96a81f 177161 ports "Ports tree" off
-src.txz 57f010e034924c2dc9518430d543b05828a0a836376b9522732012f72d054bbd 89277 src "System source tree" off
-tests.txz 555b258dda1fb840c084942a153549a731332321b49ee19bf925642fec758110 5947 tests "Test suite" off
Index: misc/freebsd-release-manifests/pkg-plist
===================================================================
--- misc/freebsd-release-manifests/pkg-plist
+++ misc/freebsd-release-manifests/pkg-plist
@@ -1,10 +1,3 @@
-%%DATADIR%%/MANIFESTS/amd64-amd64-12.2-RELEASE
-%%DATADIR%%/MANIFESTS/arm64-aarch64-12.2-RELEASE
-%%DATADIR%%/MANIFESTS/i386-i386-12.2-RELEASE
-%%DATADIR%%/MANIFESTS/powerpc-powerpc-12.2-RELEASE
-%%DATADIR%%/MANIFESTS/powerpc-powerpc64-12.2-RELEASE
-%%DATADIR%%/MANIFESTS/powerpc-powerpcspe-12.2-RELEASE
-%%DATADIR%%/MANIFESTS/sparc64-sparc64-12.2-RELEASE
%%DATADIR%%/MANIFESTS/amd64-amd64-13.0-RELEASE
%%DATADIR%%/MANIFESTS/arm64-aarch64-13.0-RELEASE
%%DATADIR%%/MANIFESTS/i386-i386-13.0-RELEASE
Index: multimedia/ustreamer/Makefile
===================================================================
--- multimedia/ustreamer/Makefile
+++ multimedia/ustreamer/Makefile
@@ -26,12 +26,4 @@
share/man/man1/ustreamer-dump.1.gz \
share/man/man1/ustreamer.1.gz
-.include <bsd.port.options.mk>
-
-# strerror_l appeared in 12 in r368915 on 2021-01-01, OSVERSION was last changed to 1202505 in r368887 on 2020-12-29
-post-patch:
-.if ${OPSYS} == "FreeBSD" && ${OSVERSION} <= 1202505
- @${REINPLACE_CMD} -e 's|strerror_l(error, locale)|strerror(error)|' ${WRKSRC}/src/libs/tools.h
-.endif
-
.include <bsd.port.mk>
Index: net/onedrive/Makefile
===================================================================
--- net/onedrive/Makefile
+++ net/onedrive/Makefile
@@ -50,8 +50,7 @@
# llvm 13.0 and above.
.if (${OSVERSION} >= 1400042) || \
- (${OSVERSION} < 1400000 && ${OSVERSION} >= 1300522) || \
- (${OSVERSION} < 1300000 && ${OSVERSION} >= 1203505)
+ (${OSVERSION} < 1400000 && ${OSVERSION} >= 1300522)
CONFIGURE_ARGS+= DCFLAGS=-L=-Wl,-z,nostart-stop-gc
.endif
Index: security/botan110/Makefile
===================================================================
--- security/botan110/Makefile
+++ security/botan110/Makefile
@@ -47,7 +47,7 @@
.include <bsd.port.pre.mk>
-.if (${OPSYS} == FreeBSD && ${OSVERSION} > 1200084) || ${SSL_DEFAULT:Mopenssl} || ${SSL_DEFAULT:M*-devel}
+.if ${OPSYS} == FreeBSD || ${SSL_DEFAULT:Mopenssl} || ${SSL_DEFAULT:M*-devel}
EXTRA_PATCHES+= ${FILESDIR}/extra-patch-openssl11
.endif
Index: security/ipsec-tools/Makefile
===================================================================
--- security/ipsec-tools/Makefile
+++ security/ipsec-tools/Makefile
@@ -76,7 +76,7 @@
.include <bsd.port.pre.mk>
-.if ${OPSYS} == FreeBSD && ${OSVERSION} > 1100510
+.if ${OPSYS} == FreeBSD
REQUIREMOD?= ipsec
.endif
Index: sysutils/bhyve+/Makefile
===================================================================
--- sysutils/bhyve+/Makefile
+++ sysutils/bhyve+/Makefile
@@ -34,12 +34,7 @@
USE_LDCONFIG= yes
.if 1200000 <= ${OSVERSION} && ${OSVERSION} < 1300000
-EXTRA_PATCHES= ${PATCHDIR}/freebsd-12
-.if ${OSVERSION} < 1203000
-EXTRA_PATCHES+= ${PATCHDIR}/freebsd-12/2
-.else
-EXTRA_PATCHES+= ${PATCHDIR}/freebsd-12/3
-.endif
+EXTRA_PATCHES= ${PATCHDIR}/freebsd-12 ${PATCHDIR}/freebsd-12/3
.elif 1300000 <= ${OSVERSION} && ${OSVERSION} < 1400000
EXTRA_PATCHES= ${PATCHDIR}/freebsd-13
.elif 1400000 <= ${OSVERSION} && ${OSVERSION} < 1500000
Index: sysutils/bhyve+/files/freebsd-12/2/patch-virtio-9p
===================================================================
--- sysutils/bhyve+/files/freebsd-12/2/patch-virtio-9p
+++ /dev/null
@@ -1,31 +0,0 @@
---- usr.sbin/bhyve/bhyve.8.orig 2021-08-19 22:38:50 UTC
-+++ usr.sbin/bhyve/bhyve.8
-@@ -242,6 +242,8 @@ Virtio network interface.
- Virtio block storage interface.
- .It Li virtio-scsi
- Virtio SCSI interface.
-+.It Li virtio-9p
-+Virtio 9p (VirtFS) interface.
- .It Li virtio-rnd
- Virtio RNG interface.
- .It Li virtio-console
-@@ -327,6 +329,19 @@ are:
- .It Li iid= Ns Ar IID
- Initiator ID to use when sending requests to specified CTL port.
- The default value is 0.
-+.El
-+.Pp
-+9P devices:
-+.Bl -tag -width 10n
-+.It Pa sharename=/path/to/share[,9p-device-options]
-+.El
-+.Pp
-+The
-+.Ar 9p-device-options
-+are:
-+.Bl -tag -width 10n
-+.It Li ro
-+Expose the share in read-only mode.
- .El
- .Pp
- TTY devices:
Index: sysutils/lsof/files/patch-Configure
===================================================================
--- sysutils/lsof/files/patch-Configure
+++ sysutils/lsof/files/patch-Configure
@@ -1,6 +1,6 @@
---- Configure.orig 2020-11-10 11:00:21.000000000 -0800
-+++ Configure 2021-01-29 19:04:42.100811000 -0800
-@@ -1628,6 +1628,10 @@
+--- Configure.orig 2020-11-10 19:00:21 UTC
++++ Configure
+@@ -1628,6 +1628,10 @@ kernel generation process.
LSOF_TSTBIGF=" "
LSOF_VERS=13000
;;
@@ -11,7 +11,7 @@
*)
echo Unknown FreeBSD release: `uname -r`
rm -f $LSOF_HLP
-@@ -1639,7 +1643,7 @@
+@@ -1639,7 +1643,7 @@ kernel generation process.
# Clear LSOF_UNSUP message for supported versions of FreeBSD.
case $LSOF_VERS in # {
Index: sysutils/lsof/files/patch-dialects-freebsd-dlsof.h
===================================================================
--- sysutils/lsof/files/patch-dialects-freebsd-dlsof.h
+++ sysutils/lsof/files/patch-dialects-freebsd-dlsof.h
@@ -1,27 +1,388 @@
--- dialects/freebsd/dlsof.h.orig 2020-11-10 19:00:21 UTC
+++ dialects/freebsd/dlsof.h
-@@ -559,7 +559,7 @@ typedef u_long KA_T;
+@@ -52,27 +52,7 @@
+ #include <sys/_lock.h>
+ #undef _KERNEL
+ #endif /* FREEBSDV>=13000 */
+-# if FREEBSDV>=4000
+-# if FREEBSDV>=5000
+-# if FREEBSDV<6020
+-# if defined(__alpha__)
+-/*
+- * For Alpha below 6.2, #include <machine/pcpu.h> before #define'ing _KERNEL.
+- * Then #define PCPU_MD_FIELDS independently. This hack avoids a compiler
+- * complaint about register use.
+- */
+-
+-#include <machine/pcpu.h>
+-#define PCPU_MD_FIELDS \
+- struct alpha_pcb pc_idlepcb; /* pcb for idling */ \
+- u_int64_t pc_idlepcbphys; /* pa of pc_idlepcb */ \
+- u_int64_t pc_pending_ipis; /* pending IPI's */ \
+- u_int32_t pc_next_asn; /* next ASN to alloc */ \
+- u_int32_t pc_current_asngen /* ASN rollover check */
+-# endif /* defined(__alpha__) */
+-# endif /* FREEBSDV<6020 */
+ #define _KERNEL 1
+-# endif /* FREEBSDV>=5000 */
+
+ # if defined(HAS_VM_MEMATTR_T)
+ /*
+@@ -129,23 +109,17 @@ typedef struct device *device_t;
+ #include "fbsd_minor.h"
+ # endif /* defined(HAS_CONF_MINOR) */
+
+-# if FREEBSDV>=5000
+ #undef _KERNEL
+-# endif /* FREEBSDV>=5000 */
+-# endif /* FREEBSDV>=4000 */
+
+ #include <sys/filedesc.h>
+ #include <sys/mbuf.h>
+ #define NFS
+ #define m_stat mnt_stat
+
+-# if FREEBSDV>=3020
+ #define _KERNEL
+-# endif /* FREEBSDV>=3020 */
+
+ #include <sys/mount.h>
+
+-# if FREEBSDV>=3020
+ # if defined(__clang__)
+ /*
+ * This definition is needed when clang is used, because <sys/mount.h> must
+@@ -156,7 +130,6 @@ int getmntinfo(struct statfs **, int);
+ # endif /* defined(__clang__) */
+
+ #undef _KERNEL
+-# endif /* FREEBSDV>=3020 */
+
+ #include <rpc/types.h>
+ #include <sys/protosw.h>
+@@ -167,9 +140,7 @@ int getmntinfo(struct statfs **, int);
+ #define _WANT_UNPCB
+ #include <sys/unpcb.h>
+
+-# if FREEBSDV>=3000
+ #undef INADDR_LOOPBACK
+-# endif /* FREEBSDV>=3000 */
+
+ #include <netinet/in.h>
+ #include <netinet/in_systm.h>
+@@ -202,21 +173,9 @@ int getmntinfo(struct statfs **, int);
+ #include <rpc/pmap_prot.h>
+ #undef pmap
+
+-# if FREEBSDV<2000
+-#include <ufs/quota.h>
+-#include <ufs/inode.h>
+-#include <ufs/ufsmount.h>
+-#include <ufs/mfsnode.h>
+-# else /* FREEBSDV>=2000 */
+ #include <paths.h>
+ #include <ufs/ufs/quota.h>
+
+-# if FREEBSDV>=4000 && FREEBSDV<5000
+-# if defined(__alpha__) || defined(__sparc64__)
+-#define dev_t void *
+-# endif /* defined(__alpha__) || defined(__sparc64__) */
+-# endif /* FREEBSDV>=4000 && FREEBSDV<5000 */
+-
+ #include <ufs/ufs/inode.h>
+
+ # if defined(HAS_UFS1_2)
+@@ -250,59 +209,28 @@ struct vop_setextattr_args;
+ #undef _KERNEL
+ # endif /* defined(HAS_UFS1_2) */
+
+-# if FREEBSDV>=5010
+ #undef i_devvp
+-# endif /* FREEBSDV>=5010 */
+
+-# if FREEBSDV>=4000 && FREEBSDV<5000
+-# if defined(__alpha__) || defined(__sparc64__)
+-#undef dev_t
+-# endif /* defined(__alpha__) || defined(__sparc64__) */
+-# endif /* FREEBSDV>=4000 && FREEBSDV<5000 */
+-
+-# if FREEBSDV<2020
+-#include <ufs/mfs/mfsnode.h>
+-# endif /* FREEBSDV<2020 */
+-
+-# endif /* FREEBSDV<2000 */
+-
+-# if FREEBSDV<5000
+-#include <nfs/nfsv2.h>
+-# else /* FREEBSDV>=5000 */
+ #include <nfs/nfsproto.h>
+-# endif /* FREEBSDV<5000 */
+
+ # if defined(HASRPCV2H)
+ #include <nfs/rpcv2.h>
+ # endif /* defined(HASRPCV2H) */
+
+-# if FREEBSDV>=5000
+ #include <nfsclient/nfs.h>
+ #include <nfsclient/nfsnode.h>
+-# else /* FREEBSDV<5000 */
+-#include <nfs/nfs.h>
+-#include <nfs/nfsnode.h>
+-# endif /* FREEBSDV>=5000 */
+
+ #include <sys/proc.h>
+ #include <kvm.h>
+ #undef TRUE
+ #undef FALSE
+
+-# if FREEBSDV<2000
+-#include <sys/kinfo.h>
+-# else /* FREEBSDV>=2000 */
+ #include <sys/sysctl.h>
+-# endif /* FREEBSDV<2000 */
+
+ # if defined(HASFDESCFS)
+ #define _KERNEL
+ #define KERNEL
+-# if FREEBSDV>=5000
+ #include <fs/fdescfs/fdesc.h>
+-# else /* FREEBSDV<5000 */
+-#include <miscfs/fdesc/fdesc.h>
+-# endif /* FREEBSDV>=5000 */
+ #undef _KERNEL
+ #undef KERNEL
+ # endif /* defined(HASFDESCFS) */
+@@ -311,24 +239,13 @@ struct vop_setextattr_args;
+ #define _KERNEL
+ #define KERNEL
+ struct vop_generic_args;
+-# if FREEBSDV>=5000
+ #include <fs/nullfs/null.h>
+-# else /* FREEBSDV<5000 */
+-#include <miscfs/nullfs/null.h>
+-# endif /* FREEBSDV>=5000 */
+ #undef _KERNEL
+ #undef KERNEL
+ # endif /* defined(HASNULLFS) */
+
+ # if defined(HASPROCFS)
+-# if FREEBSDV<2000
+-#include <procfs/pfsnode.h>
+-# else /* FREEBSDV>=2000 */
+-# if FREEBSDV<5000
+-#include <miscfs/procfs/procfs.h>
+-# endif /* FREEBSDV<5000 */
+ #include <machine/reg.h>
+-# endif /* FREEBSDV<2000 */
+
+ #define PNSIZ 5
+ # endif /* defined(HASPROCFS) */
+@@ -342,24 +259,6 @@ struct vop_generic_args;
+ # endif /* defined(HAS_ZFS) */
+
+
+-# if FREEBSDV<2000
+-#define P_COMM p_comm
+-#define P_FD p_fd
+-#define P_PID p_pid
+-#define P_PGID p_pgrp
+-#define P_STAT p_stat
+-#define P_VMSPACE p_vmspace
+-# else /* FREEBSDV>=2000 */
+-# if FREEBSDV<5000
+-#define P_ADDR kp_eproc.e_paddr
+-#define P_COMM kp_proc.p_comm
+-#define P_FD kp_proc.p_fd
+-#define P_PID kp_proc.p_pid
+-#define P_PGID kp_eproc.e_pgid
+-#define P_PPID kp_eproc.e_ppid
+-#define P_STAT kp_proc.p_stat
+-#define P_VMSPACE kp_proc.p_vmspace
+-# else /* FREEBSDV>=5000 */
+ #define P_ADDR ki_paddr
+ #define P_COMM ki_comm
+ #define P_FD ki_fd
+@@ -368,8 +267,6 @@ struct vop_generic_args;
+ #define P_PPID ki_ppid
+ #define P_STAT ki_stat
+ #define P_VMSPACE ki_vmspace
+-# endif /* FREEBSDV<5000 */
+-# endif /* FREEBSDV<2000 */
+
+ #include <vm/vm.h>
+
+@@ -431,20 +328,12 @@ int open(const char *, int, ...);
+
+ # if defined(DTYPE_KQUEUE)
+ #define HASKQUEUE /* has the kqueue file type */
+-# if FREEBSDV>=4090
+ #define _KERNEL
+-# endif /* FREEBSDV>=4090 */
+ #include <sys/eventvar.h>
+-# if FREEBSDV>=4090
+ #undef _KERNEL
+-# endif /* FREEBSDV>=4090 */
+ # endif /* defined(DTYPE_KQUEUE) */
+
+-# if FREEBSDV<2000
+-#include <ufs/lockf.h>
+-# else /* FREEBSDV>=2000 */
+ struct vop_advlock_args { int dummy; }; /* to pacify lf_advlock() prototype */
+-# if FREEBSDV>=5000
+ #undef MALLOC_DECLARE
+ #define MALLOC_DECLARE(type) extern struct malloc_type type[1]
+ /* to pacify <sys/lockf.h> */
+@@ -460,23 +349,15 @@ struct vop_advlock_args { int dummy; }; /* to pacify l
+
+ #include <fs/devfs/devfs.h>
+ #undef _KERNEL
+-# endif /* FREEBSDV>=5000 */
+ #include <sys/lockf.h>
+-# endif /* FREEBSDV<2000 */
+
+-# if FREEBSDV>=2020
+-# if FREEBSDV>=4090
+ #define _KERNEL
+-# endif /* FREEBSDV>=4090 */
+ #include <sys/pipe.h>
+-# if FREEBSDV>=4090
+ #undef _KERNEL
+-# endif /* FREEBSDV>=4090 */
+ # if defined(HASVMLOCKH)
+ #include <vm/lock.h>
+ # endif /* defined(HASVMLOCKH) */
+ #include <vm/pmap.h>
+-# endif /* FREEBSDV>=2020 */
+
+ #include <vm/vm_map.h>
+
+@@ -492,21 +373,13 @@ struct vop_advlock_args { int dummy; }; /* to pacify l
+ #include <vm/vm_object.h>
+ #include <vm/vm_pager.h>
+
+-# if FREEBSDV>=2020
+ #undef B_NEEDCOMMIT
+
+-# if FREEBSDV>=5000
+ #include <sys/bio.h>
+-# endif /* FREEBSDV>=5000 */
+
+ #include <sys/buf.h>
+ #include <sys/user.h>
+
+-# if FREEBSDV<5000
+-#include <ufs/mfs/mfsnode.h>
+-# endif /* FREEBSDV<5000 */
+-# endif /* FREEBSDV>=2020 */
+-
+ #undef bcmp /* avoid _KERNEL conflict */
+ #undef bcopy /* avoid _KERNEL conflict */
+ #undef bzero /* avoid _KERNEL conflict */
+@@ -521,11 +394,7 @@ struct vop_advlock_args { int dummy; }; /* to pacify l
+ #define DEVINCR 1024 /* device table malloc() increment */
+
+ # if !defined(FREEBSD_KA_T)
+-# if FREEBSDV<2000
+-typedef off_t KA_T;
+-# else /* FREEBSDV>=2000 */
+ typedef u_long KA_T;
+-# endif /* FREEBSDV<2000 */
+ # endif /* !defined(FREEBSD_KA_T) */
+
+ #define KMEM "/dev/kmem"
+@@ -559,11 +428,9 @@ typedef u_long KA_T;
* Global storage definitions (including their structure definitions)
*/
-struct file * Cfp;
+extern struct file * Cfp;
- # if FREEBSDV>=2000
+-# if FREEBSDV>=2000
extern kvm_t *Kd;
-@@ -663,9 +663,15 @@ struct sfile {
+-# endif /* FREEBSDV>=2000 */
+
+ # if defined(P_ADDR)
+ extern KA_T Kpa;
+@@ -607,9 +474,7 @@ extern KA_T X_bfopsa;
+
+ extern int Np; /* number of kernel processes */
+
+-# if FREEBSDV>=2000
+ extern struct kinfo_proc *P; /* local process table copy */
+-# endif /* FREEBSDV>=2000 */
+
+ struct sfile {
+ char *aname; /* argument file name */
+@@ -626,15 +491,8 @@ struct sfile {
+
+ };
+
+-# if FREEBSDV==4100 || FREEBSDV==4110
+-#define XDR_VOID (xdrproc_t)xdr_void
+-#define XDR_PMAPLIST (xdrproc_t)xdr_pmaplist
+-# endif /* FREEBSDV==4100 || FREEBSDV==4110 */
+-
+-# if FREEBSDV>=5000
+ #define XDR_VOID (const xdrproc_t)xdr_void
+ #define XDR_PMAPLIST (const xdrproc_t)xdr_pmaplist
+-# endif /* FREEBSDV>=5000 */
+
+
+ /*
+@@ -651,9 +509,9 @@ struct sfile {
+
+ # if defined(HASNCACHE)
+ #include <sys/uio.h>
+-# if FREEBSDV<4000 || (FREEBSDV>=4000 && defined(HASNAMECACHE))
++# if defined(HASNAMECACHE)
+ #include <sys/namei.h>
+-# else /* FREEBSDV>=4000 && !defined(HASNAMECACHE) */
++# else /* !defined(HASNAMECACHE) */
+ /*
+ * The namecache struct definition should come from a header file that
+ * can be #include'd, but it has been moved to a kernel source file in
+@@ -663,9 +521,9 @@ struct sfile {
*/
struct namecache {
-+# if __FreeBSD_version < 1202000 || (__FreeBSD_version >= 1300000 && __FreeBSD_version < 1300105)
- LIST_ENTRY(namecache) nc_hash; /* hash chain */
+- LIST_ENTRY(namecache) nc_hash; /* hash chain */
LIST_ENTRY(namecache) nc_src; /* source vnode list */
TAILQ_ENTRY(namecache) nc_dst; /* destination vnode list */
-+# else
-+ LIST_ENTRY(namecache) nc_src; /* source vnode list */
-+ TAILQ_ENTRY(namecache) nc_dst; /* destination vnode list */
+ LIST_ENTRY(namecache) nc_hash; /* hash chain */
-+# endif
struct vnode *nc_dvp; /* vnode of parent of name */
struct vnode *nc_vp; /* vnode the name refers to */
u_char nc_flag; /* flag bits */
+@@ -682,22 +540,14 @@ struct namecache {
+ * suggesting the guess is a safe one.
+ * (VAA, 10 Apr 2002) */
+ };
+-# endif /* FREEBSDV<4000 || (FREEBSDV>=4000 && defined(HASNAMECACHE)) */
++# endif /* defined(HASNAMECACHE) */
+
+ #define NCACHE namecache /* kernel's structure name */
+ #define NCACHE_NM nc_name /* name in NCACHE */
+ #define NCACHE_NMLEN nc_nlen /* name length in NCACHE */
+
+-# if FREEBSDV<2005
+-#define NCACHE_NXT nc_nxt /* link in NCACHE */
+-# else /* FREEBSDV>=2005 */
+-# if FREEBSDV<2010
+-#define NCACHE_NXT nc_lru.tqe_next /* link in NCACHE */
+-# else /* FREEBSDV>=2010 */
+ #include <stddef.h>
+ #define NCACHE_NXT nc_hash.le_next /* link in NCACHE */
+-# endif /* FREEBSDV<2010 */
+-# endif /* FREEBSDV<2005 */
+
+ #define NCACHE_NODEADDR nc_vp /* node address in NCACHE */
+ #define NCACHE_PARADDR nc_dvp /* parent node address in NCACHE */
+@@ -708,9 +558,7 @@ struct namecache {
+ # endif /* DEFINED(HASNCVPID) */
+ # endif /* defined(HASNCACHE) */
+
+-# if FREEBSDV>=5000
+ #define VNODE_VFLAG v_iflag
+ #define NCACHE_VROOT VV_ROOT
+-# endif /* FREEBSDV>=5000 */
+
+ #endif /* defined(FREEBSD_LSOF_H) */
Index: sysutils/lsof/files/patch-dialects_freebsd_dproc.c
===================================================================
--- sysutils/lsof/files/patch-dialects_freebsd_dproc.c
+++ sysutils/lsof/files/patch-dialects_freebsd_dproc.c
@@ -10,7 +10,94 @@
int i, nf;
MALLOC_S nb;
-@@ -330,7 +333,11 @@ gather_proc_info()
+@@ -157,13 +160,7 @@ gather_proc_info()
+ int tid; /* thread (task) ID */
+ uid_t uid;
+
+-#if FREEBSDV<2000
+- struct proc *p;
+- struct pcred pc;
+- struct pgrp pg;
+-#else /* FREEBSDV>=2000 */
+ struct kinfo_proc *p;
+-#endif /* FREEBSDV<2000 */
+
+ #if defined(HASFSTRUCT) && !defined(HAS_FILEDESCENT)
+ static char *pof = (char *)NULL;
+@@ -223,9 +220,6 @@ gather_proc_info()
+ * Read the process table.
+ */
+
+-#if FREEBSDV<2000
+- if ((Np = kvm_getprocs(KINFO_PROC_ALL, 0)) < 0)
+-#else /* FREEBSDV>=2000 */
+
+ # if !defined(KERN_PROC_PROC)
+ #define KERN_PROC_PROC KERN_PROC_ALL
+@@ -234,18 +228,11 @@ gather_proc_info()
+ if ((P = kvm_getprocs(Kd, Ftask ? KERN_PROC_ALL : KERN_PROC_PROC,
+ 0, &Np))
+ == NULL)
+-#endif /* FREEBSDV<2000 */
+
+ {
+ (void) fprintf(stderr, "%s: can't read process table: %s\n",
+ Pn,
+-
+-#if FREEBSDV<2000
+- kvm_geterr()
+-#else /* FREEBSDV>=2000 */
+ kvm_geterr(Kd)
+-#endif /* FREEBSDV<2000 */
+-
+ );
+ Exit(1);
+ }
+@@ -253,43 +240,13 @@ gather_proc_info()
+ * Examine proc structures and their associated information.
+ */
+
+-#if FREEBSDV<2000
+- for (px = 0; px < Np; px++)
+-#else /* FREEBSDV>=2000 */
+ for (p = P, px = 0; px < Np; p++, px++)
+-#endif /* FREEBSDV<2000 */
+-
+ {
+
+-#if FREEBSDV<2000
+- /*
+- * Read process information, process group structure (if
+- * necessary), and User ID (if necessary).
+- */
+- if (!(p = kvm_nextproc()))
+- continue;
+ if (p->P_STAT == 0 || p->P_STAT == SZOMB)
+ continue;
+- pg.pg_id = 0;
+- if (Fpgid && p->P_PGID) {
+- if (kread((KA_T)p->P_PGID, (char *)&pg, sizeof(pg)))
+- continue;
+- }
+- pgid = pg.pg_id;
+- if (!p->p_cred
+- || kread((KA_T)p->p_cred, (char *)&pc, sizeof(pc)))
+- continue;
+- uid = pc.p_ruid;
+-#else /* FREEBSDV>=2000 */
+- if (p->P_STAT == 0 || p->P_STAT == SZOMB)
+- continue;
+ pgid = p->P_PGID;
+-# if FREEBSDV<5000
+- uid = p->kp_eproc.e_ucred.cr_uid;
+-# else /* FREEBSDV>=5000 */
+ uid = p->ki_uid;
+-# endif /* FREEBSDV<5000 */
+-#endif /* FREEBSDV<2000 */
+
+ #if defined(HASPPID)
+ ppid = p->P_PPID;
+@@ -330,7 +287,11 @@ gather_proc_info()
#if defined(HAS_PWD)
cdir = rdir = jdir = NULL;
@@ -22,3 +109,96 @@
if (pwd_addr != 0) {
if (!kread(pwd_addr, (char *)&pwd, sizeof(pwd))) {
cdir = pwd.pwd_cdir;
+@@ -397,7 +358,6 @@ gather_proc_info()
+ link_lfile();
+ }
+
+-#if FREEBSDV>=5000
+ /*
+ * Save jail directory information.
+ */
+@@ -408,7 +368,6 @@ gather_proc_info()
+ if (Lf->sf)
+ link_lfile();
+ }
+-#endif /* FREEBSDV>=5000 */
+
+ /*
+ * Save information on the text file.
+@@ -561,23 +520,13 @@ get_kernel_access()
+ * Open kernel memory access.
+ */
+
+-#if FREEBSDV<2000
+- if (kvm_openfiles(Nmlst, Memory, NULL) == -1)
+-#else /* FREEBSDV>=2000 */
+ if ((Kd = kvm_open(Nmlst, Memory, NULL, O_RDONLY, NULL)) == NULL)
+-#endif /* FREEBSDV<2000 */
+
+ {
+ (void) fprintf(stderr,
+ "%s: kvm_open%s(execfile=%s, corefile=%s): %s\n",
+ Pn,
+-
+-#if FREEBSDV<2000
+- "files",
+-#else /* FREEBSDV>=2000 */
+ "",
+-#endif /* FREEBSDV<2000 */
+-
+ Nmlst ? Nmlst : "default",
+ Memory ? Memory :
+
+@@ -678,11 +627,7 @@ kread(addr, buf, len)
+ {
+ int br;
+
+-#if FREEBSDV<2000
+- br = kvm_read((void *)addr, (void *)buf, len);
+-#else /* FREEBSDV>=2000 */
+ br = kvm_read(Kd, (u_long)addr, buf, len);
+-#endif /* FREEBSDV<2000 */
+
+ return((br == len) ? 0 : 1);
+ }
+@@ -724,9 +669,6 @@ process_text(vm)
+ struct vm_object vmo;
+ struct vmspace vmsp;
+
+-#if FREEBSDV<2020
+- struct pager_struct pg;
+-#endif /* FREEBSDV<2020 */
+
+ /*
+ * Read the vmspace structure for the process.
+@@ -762,30 +704,16 @@ process_text(vm)
+ j < 2 && ka;
+ j++,
+
+-#if FREEBSDV<2020
+- ka = (KA_T)vmo.shadow
+-#else /* FREEBSDV>=2020 */
+ ka = (KA_T)vmo.backing_object
+-#endif /* FREEBSDV<2020 */
+ )
+ {
+ if (kread(ka, (char *)&vmo, sizeof(vmo)))
+ break;
+
+-#if FREEBSDV<2020
+- if ((ka = (KA_T)vmo.pager) == NULL
+- || kread(ka, (char *)&pg, sizeof(pg)))
+- continue;
+- if (pg.pg_handle == NULL || pg.pg_type != PG_VNODE)
+- continue;
+- (void) (enter_vn_text((KA_T)pg.pg_handle, &n));
+-#else /* FREEBSDV>=2020 */
+ if (vmo.type != OBJT_VNODE
+ || vmo.handle == (void *)NULL)
+ continue;
+ (void) (enter_vn_text((KA_T)vmo.handle, &n));
+-#endif /* FREEBSDV<2020 */
+-
+ }
+ }
+ }
Index: x11/wayland-logout/Makefile
===================================================================
--- x11/wayland-logout/Makefile
+++ x11/wayland-logout/Makefile
@@ -20,7 +20,7 @@
# Cannot use C implementation without cr_pid
.if make(makesum)
DISTFILES= ${DISTNAME:S/${DISTVERSION}/1.3/}${EXTRACT_SUFX}
-.elif ${OPSYS} != FreeBSD || ${OSVERSION} < 1202506
+.elif ${OPSYS} != FreeBSD
DISTVERSION= 1.3
NO_ARCH= yes
MESON_ARGS+= -Dimplementation=shell

File Metadata

Mime Type
text/plain
Expires
Thu, Jul 23, 5:55 AM (1 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35355171
Default Alt Text
D34523.id103732.diff (68 KB)

Event Timeline