svn commit: r522695 - head/emulators/open-vm-tools/files
Josh Paetzel
jpaetzel at FreeBSD.org
Sat Jan 11 16:24:55 UTC 2020
Author: jpaetzel
Date: Sat Jan 11 16:24:54 2020
New Revision: 522695
URL: https://svnweb.freebsd.org/changeset/ports/522695
Log:
Fix build on HEAD
PR: 242679
Submitted by: Ruslan Garipov <brigadir15 at gmail.com>
Reviewed by: jhb
Added:
head/emulators/open-vm-tools/files/patch-modules_freebsd_vmmemctl_os.c (contents, props changed)
Added: head/emulators/open-vm-tools/files/patch-modules_freebsd_vmmemctl_os.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/emulators/open-vm-tools/files/patch-modules_freebsd_vmmemctl_os.c Sat Jan 11 16:24:54 2020 (r522695)
@@ -0,0 +1,64 @@
+--- modules/freebsd/vmmemctl/os.c.orig 2019-10-21 21:58:04 UTC
++++ modules/freebsd/vmmemctl/os.c
+@@ -64,7 +64,11 @@
+
+ typedef struct {
+ /* system structures */
++#if __FreeBSD_version >= 1300067
++ struct callout callout_handle;
++#else
+ struct callout_handle callout_handle;
++#endif
+
+ /* termination flag */
+ volatile int stop;
+@@ -678,7 +682,12 @@ vmmemctl_poll(void *data) // IN
+ if (!t->stop) {
+ /* invoke registered handler, rearm timer */
+ Balloon_QueryAndExecute();
++#if __FreeBSD_version >= 1300067
++ callout_reset(&t->callout_handle, BALLOON_POLL_PERIOD * hz, vmmemctl_poll,
++ t);
++#else
+ t->callout_handle = timeout(vmmemctl_poll, t, BALLOON_POLL_PERIOD * hz);
++#endif
+ }
+ }
+
+@@ -712,15 +721,23 @@ vmmemctl_init(void)
+ }
+
+ /* initialize timer state */
++#if __FreeBSD_version >= 1300067
++ callout_init(&state->timer.callout_handle, 0);
++#else
+ callout_handle_init(&state->timer.callout_handle);
++#endif
+
+ os_pmap_init(pmap);
+ os_balloonobject_create();
+
+ /* Set up and start polling */
+- callout_handle_init(&t->callout_handle);
+ t->stop = FALSE;
++#if __FreeBSD_version >= 1300067
++ callout_reset(&t->callout_handle, BALLOON_POLL_PERIOD * hz, vmmemctl_poll,
++ t);
++#else
+ t->callout_handle = timeout(vmmemctl_poll, t, BALLOON_POLL_PERIOD * hz);
++#endif
+
+ vmmemctl_init_sysctl();
+
+@@ -759,7 +776,11 @@ vmmemctl_cleanup(void)
+
+ /* Stop polling */
+ t->stop = TRUE;
++#if __FreeBSD_version >= 1300067
++ callout_drain(&t->callout_handle);
++#else
+ untimeout(vmmemctl_poll, t, t->callout_handle);
++#endif
+
+ os_balloonobject_delete();
+ os_pmap_free(pmap);
More information about the svn-ports-all
mailing list