With epoll-shim (attached) newer freerdp works well enough.

The TestSynchWaitableTimer test does still hang but runtime works well
enough and it lets us get updated past the vulnerable version we've stuck
with for ages due to it required either timerfd/posix timers/or a custom
implementation.

OK to import epoll-shim?

(I'm testing ports that depend on freerdp now).

Index: Makefile
===================================================================
RCS file: /cvs/ports/x11/freerdp/Makefile,v
retrieving revision 1.41
diff -u -p -r1.41 Makefile
--- Makefile    31 Jan 2021 20:14:42 -0000      1.41
+++ Makefile    26 Feb 2021 16:15:51 -0000
@@ -4,25 +4,13 @@
 BROKEN-hppa =          undefined reference to __sync_val_compare_and_swap_4
 
 COMMENT =              client for Microsoft RDP (remote desktop protocol)
-DISTNAME =             freerdp-2.0.0-rc1
-PKGNAME =              freerdp-2.0.0rc1
-REVISION =             5
+DISTNAME =             freerdp-2.3.0
 CATEGORIES =           x11 net
 
-# XXX This version has known security issues.
-
-# XXX Can't be updated without either timer_create() and friends or
-#     an alternative timer implementation (as was done for OSX).
-#     Make sure it gets through the waitable timer checks in "make
-#     test" without hanging or failing. Since it came up a few times,
-#     just setting "timer->fd = kqueue()" in InitializeWaitableTimer
-#     is not enough. See https://junkpile.org/freerdp.diff for the
-#     non-timer-related parts of an update.
-
-SHARED_LIBS +=  freerdp-client2           0.0 # 2.0
-SHARED_LIBS +=  freerdp2                  0.0 # 2.0
-SHARED_LIBS +=  winpr-tools2              0.0 # 2.0
-SHARED_LIBS +=  winpr2                    0.0 # 2.0
+SHARED_LIBS +=  freerdp-client2           1.0
+SHARED_LIBS +=  freerdp2                  1.0
+SHARED_LIBS +=  winpr-tools2              1.0
+SHARED_LIBS +=  winpr2                    1.0
 
 HOMEPAGE =             https://www.freerdp.com/
 MASTER_SITES =         https://pub.freerdp.com/releases/
@@ -30,25 +18,31 @@ MASTER_SITES =              https://pub.freerdp.com/
 # Apache 2.0
 PERMIT_PACKAGE =       Yes
 
-WANTLIB += X11 Xcursor Xext Xfixes Xi Xinerama Xrender Xv avcodec
-WANTLIB += avutil c crypto cups execinfo m pthread ssl xkbfile
+WANTLIB += X11 Xcursor Xext Xfixes Xi Xinerama Xrandr Xrender Xv
+WANTLIB += avcodec avutil c crypto cups epoll-shim m pthread ssl
+WANTLIB += swresample usb-1.0 xkbfile
 
 # thread-local storage
 COMPILER =             base-clang ports-gcc
 
 MODULES =              devel/cmake
 
-CFLAGS +=              -I${X11BASE}/include -I${LOCALBASE}/include
+CFLAGS +=              -I${X11BASE}/include \
+                       -I${LOCALBASE}/include
 
 CFLAGS +=              -fcommon
 
 BUILD_DEPENDS =                security/pcsc-lite \
                        textproc/xmlto
 
-LIB_DEPENDS =          devel/libexecinfo \
+LIB_DEPENDS =          devel/libusb1 \
                        print/cups,-libs \
                        graphics/ffmpeg
 
+# used to work-around lack of posix timers.
+# not quite everything is correct, but works well enough for most use.
+LIB_DEPENDS +=         devel/epoll-shim
+
 CONFIGURE_ARGS +=      -DBUILD_TESTING=ON \
                        -DWITH_CUPS=ON \
                        -DWITH_DIRECTFB=OFF \
@@ -59,12 +53,11 @@ CONFIGURE_ARGS +=   -DBUILD_TESTING=ON \
                        -DWITH_LIBSYSTEMD=OFF \
                        -DWITH_OSS=OFF
 
-pre-configure:
-       ${SUBST_CMD}    ${WRKSRC}/winpr/libwinpr/CMakeLists.txt
-       ${SUBST_CMD}    ${WRKSRC}/CMakeLists.txt
-
 .if ${MACHINE_ARCH} == "sparc64"
 CONFIGURE_ARGS +=      -DWITH_NEON=OFF
 .endif
+
+pre-configure:
+       sed -i 's,/usr/local,${LOCALBASE},g' 
${WRKSRC}/{,winpr/libwinpr/}CMakeLists.txt
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/x11/freerdp/distinfo,v
retrieving revision 1.8
diff -u -p -r1.8 distinfo
--- distinfo    28 Apr 2018 19:20:17 -0000      1.8
+++ distinfo    26 Feb 2021 16:15:51 -0000
@@ -1,2 +1,2 @@
-SHA256 (freerdp-2.0.0-rc1.tar.gz) = 
8JogqXEWPCeD77egtIyGBuIPl7RB9xjyUoNDgnex+Hs=
-SIZE (freerdp-2.0.0-rc1.tar.gz) = 6575999
+SHA256 (freerdp-2.3.0.tar.gz) = lO6I9Ws0TH+WDWgF6i24sd66PI9gnbCX4IzN9r35vXg=
+SIZE (freerdp-2.3.0.tar.gz) = 7280113
Index: patches/patch-CMakeLists_txt
===================================================================
RCS file: /cvs/ports/x11/freerdp/patches/patch-CMakeLists_txt,v
retrieving revision 1.6
diff -u -p -r1.6 patch-CMakeLists_txt
--- patches/patch-CMakeLists_txt        28 Apr 2018 19:20:17 -0000      1.6
+++ patches/patch-CMakeLists_txt        26 Feb 2021 16:15:51 -0000
@@ -3,16 +3,59 @@ $OpenBSD: patch-CMakeLists_txt,v 1.6 201
 Index: CMakeLists.txt
 --- CMakeLists.txt.orig
 +++ CMakeLists.txt
-@@ -953,9 +953,9 @@ if(WAYLAND_FOUND)
+@@ -194,12 +194,14 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "BSD")
+       set(BSD TRUE)
+       if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
+               set(FREEBSD TRUE)
++              set(EPOLLSHIM TRUE)
+       endif()
+       if(${CMAKE_SYSTEM_NAME} MATCHES "kFreeBSD")
+               set(KFREEBSD TRUE)
+       endif()
+       if(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
+               set(OPENBSD TRUE)
++              set(EPOLLSHIM TRUE)
+       endif()
+ endif()
+ 
+@@ -208,7 +210,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "DragonFly")
+       set(FREEBSD TRUE)
  endif()
  
- if(BSD)
--      if(IS_DIRECTORY /usr/local/include)
--              include_directories(/usr/local/include)
--              link_directories(/usr/local/lib)
-+      if(IS_DIRECTORY ${LOCALBASE}/include)
-+              include_directories(${LOCALBASE}/include)
-+              link_directories(${LOCALBASE}/lib)
+-if(FREEBSD)
++if(EPOLLSHIM)
+       find_path(EPOLLSHIM_INCLUDE_DIR NAMES sys/epoll.h sys/timerfd.h HINTS 
/usr/local/include/libepoll-shim)
+       find_library(EPOLLSHIM_LIBS NAMES epoll-shim libepoll-shim HINTS 
/usr/local/lib)
+ endif()
+@@ -524,7 +526,7 @@ add_definitions(-DWINPR_EXPORTS -DFREERDP_EXPORTS)
+ if(NOT IOS)
+       check_include_files(fcntl.h HAVE_FCNTL_H)
+       check_include_files(unistd.h HAVE_UNISTD_H)
+-      check_include_files(execinfo.h HAVE_EXECINFO_H)
++      #check_include_files(execinfo.h HAVE_EXECINFO_H)
+       check_include_files(inttypes.h HAVE_INTTYPES_H)
+       check_include_files(sys/modem.h HAVE_SYS_MODEM_H)
+       check_include_files(sys/filio.h HAVE_SYS_FILIO_H)
+@@ -576,7 +578,7 @@ if(OPENBSD)
+       set(WITH_MANPAGES "ON")
+       set(WITH_ALSA "OFF")
+       set(WITH_PULSE "OFF")
+-      set(WITH_OSS "ON")
++      set(WITH_OSS "OFF")
+       set(WITH_WAYLAND "OFF")
+ endif()
+ 
+@@ -631,11 +633,11 @@ if(UNIX OR CYGWIN)
+       if (HAVE_SYS_EVENTFD_H)
+               check_symbol_exists(eventfd_read sys/eventfd.h 
WITH_EVENTFD_READ_WRITE)
+       endif()
+-      if (FREEBSD)
++      if (EPOLLSHIM)
+               list(APPEND CMAKE_REQUIRED_INCLUDES ${EPOLLSHIM_INCLUDE_DIR})
+       endif()
+       check_include_files(sys/timerfd.h HAVE_SYS_TIMERFD_H)
+-      if (FREEBSD)
++      if (EPOLLSHIM)
+               list(REMOVE_ITEM CMAKE_REQUIRED_INCLUDES 
${EPOLLSHIM_INCLUDE_DIR})
        endif()
-       if(OPENBSD)
-               if(IS_DIRECTORY /usr/X11R6/include)
+       check_include_files(poll.h HAVE_POLL_H)
Index: patches/patch-channels_rdpdr_client_rdpdr_main_c
===================================================================
RCS file: patches/patch-channels_rdpdr_client_rdpdr_main_c
diff -N patches/patch-channels_rdpdr_client_rdpdr_main_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-channels_rdpdr_client_rdpdr_main_c    26 Feb 2021 16:15:51 
-0000
@@ -0,0 +1,23 @@
+$OpenBSD$
+
+Index: channels/rdpdr/client/rdpdr_main.c
+--- channels/rdpdr/client/rdpdr_main.c.orig
++++ channels/rdpdr/client/rdpdr_main.c
+@@ -111,7 +111,7 @@ static UINT rdpdr_send_device_list_remove_request(rdpd
+       return rdpdr_send(rdpdr, s);
+ }
+ 
+-#if defined(_UWP) || defined(__IOS__)
++#if defined(_UWP) || defined(__IOS__) || defined(__OpenBSD__)
+ 
+ void first_hotplug(rdpdrPlugin* rdpdr)
+ {
+@@ -957,7 +957,7 @@ out:
+ 
+ #endif
+ 
+-#if !defined(_WIN32) && !defined(__IOS__)
++#if !defined(_WIN32) && !defined(__IOS__) && !defined(__OpenBSD__)
+ /**
+  * Function description
+  *
Index: patches/patch-channels_tsmf_client_ffmpeg_tsmf_ffmpeg_c
===================================================================
RCS file: patches/patch-channels_tsmf_client_ffmpeg_tsmf_ffmpeg_c
diff -N patches/patch-channels_tsmf_client_ffmpeg_tsmf_ffmpeg_c
--- patches/patch-channels_tsmf_client_ffmpeg_tsmf_ffmpeg_c     17 Feb 2019 
21:34:01 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,18 +0,0 @@
-$OpenBSD: patch-channels_tsmf_client_ffmpeg_tsmf_ffmpeg_c,v 1.1 2019/02/17 
21:34:01 sthen Exp $
-
-Fix future ffmpeg support
-
-Index: channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c
---- channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c.orig
-+++ channels/tsmf/client/ffmpeg/tsmf_ffmpeg.c
-@@ -207,8 +207,8 @@ static BOOL tsmf_ffmpeg_init_stream(ITSMFDecoder* deco
-               }
-       }
- 
--      if (mdecoder->codec->capabilities & CODEC_CAP_TRUNCATED)
--              mdecoder->codec_context->flags |= CODEC_FLAG_TRUNCATED;
-+      if (mdecoder->codec->capabilities & AV_CODEC_CAP_TRUNCATED)
-+              mdecoder->codec_context->flags |= AV_CODEC_FLAG_TRUNCATED;
-       return TRUE;
- }
- 
Index: patches/patch-client_X11_CMakeLists_txt
===================================================================
RCS file: /cvs/ports/x11/freerdp/patches/patch-client_X11_CMakeLists_txt,v
retrieving revision 1.3
diff -u -p -r1.3 patch-client_X11_CMakeLists_txt
--- patches/patch-client_X11_CMakeLists_txt     28 Apr 2018 19:20:17 -0000      
1.3
+++ patches/patch-client_X11_CMakeLists_txt     26 Feb 2021 16:15:51 -0000
@@ -3,7 +3,7 @@ $OpenBSD: patch-client_X11_CMakeLists_tx
 Index: client/X11/CMakeLists.txt
 --- client/X11/CMakeLists.txt.orig
 +++ client/X11/CMakeLists.txt
-@@ -203,7 +203,7 @@ endif()
+@@ -229,7 +229,7 @@ endif()
  include_directories(${CMAKE_SOURCE_DIR}/resources)
  
  set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} freerdp-client freerdp m)
Index: patches/patch-client_common_CMakeLists_txt
===================================================================
RCS file: /cvs/ports/x11/freerdp/patches/patch-client_common_CMakeLists_txt,v
retrieving revision 1.1
diff -u -p -r1.1 patch-client_common_CMakeLists_txt
--- patches/patch-client_common_CMakeLists_txt  28 Apr 2018 19:20:17 -0000      
1.1
+++ patches/patch-client_common_CMakeLists_txt  26 Feb 2021 16:15:51 -0000
@@ -1,9 +1,11 @@
 $OpenBSD: patch-client_common_CMakeLists_txt,v 1.1 2018/04/28 19:20:17 landry 
Exp $
-Doesn't use ossaudio for OpenBSD
+
+Don't use ossaudio for OpenBSD
+
 Index: client/common/CMakeLists.txt
 --- client/common/CMakeLists.txt.orig
 +++ client/common/CMakeLists.txt
-@@ -66,11 +66,7 @@ endif()
+@@ -67,11 +67,7 @@ endif()
  set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} winpr)
  
  target_link_libraries(${MODULE_NAME} ${PRIVATE_KEYWORD} 
${FREERDP_CHANNELS_CLIENT_LIBS})
Index: patches/patch-libfreerdp_codec_h264_ffmpeg_c
===================================================================
RCS file: patches/patch-libfreerdp_codec_h264_ffmpeg_c
diff -N patches/patch-libfreerdp_codec_h264_ffmpeg_c
--- patches/patch-libfreerdp_codec_h264_ffmpeg_c        17 Feb 2019 21:34:01 
-0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,28 +0,0 @@
-$OpenBSD: patch-libfreerdp_codec_h264_ffmpeg_c,v 1.1 2019/02/17 21:34:01 sthen 
Exp $
-
-Fix future ffmpeg support
-
-Index: libfreerdp/codec/h264_ffmpeg.c
---- libfreerdp/codec/h264_ffmpeg.c.orig
-+++ libfreerdp/codec/h264_ffmpeg.c
-@@ -146,7 +146,7 @@ static BOOL libavcodec_create_encoder(H264_CONTEXT* h2
-       };
-       av_opt_set(sys->codecEncoderContext, "preset", "veryfast", 
AV_OPT_SEARCH_CHILDREN);
-       av_opt_set(sys->codecEncoderContext, "tune", "zerolatency", 
AV_OPT_SEARCH_CHILDREN);
--      sys->codecEncoderContext->flags |= CODEC_FLAG_LOOP_FILTER;
-+      sys->codecEncoderContext->flags |= AV_CODEC_FLAG_LOOP_FILTER;
-       sys->codecEncoderContext->me_cmp |= 1;
-       sys->codecEncoderContext->me_subpel_quality = 3;
-       sys->codecEncoderContext->me_range = 16;
-@@ -404,9 +404,9 @@ static BOOL libavcodec_init(H264_CONTEXT* h264)
-                       goto EXCEPTION;
-               }
- 
--              if (sys->codecDecoder->capabilities & CODEC_CAP_TRUNCATED)
-+              if (sys->codecDecoder->capabilities & AV_CODEC_CAP_TRUNCATED)
-               {
--                      sys->codecDecoderContext->flags |= CODEC_FLAG_TRUNCATED;
-+                      sys->codecDecoderContext->flags |= 
AV_CODEC_FLAG_TRUNCATED;
-               }
- 
-               if (avcodec_open2(sys->codecDecoderContext, sys->codecDecoder, 
NULL) < 0)
Index: patches/patch-libfreerdp_core_nla_c
===================================================================
RCS file: patches/patch-libfreerdp_core_nla_c
diff -N patches/patch-libfreerdp_core_nla_c
--- patches/patch-libfreerdp_core_nla_c 8 Jun 2018 20:32:16 -0000       1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,29 +0,0 @@
-$OpenBSD: patch-libfreerdp_core_nla_c,v 1.1 2018/06/08 20:32:16 denis Exp $
-
-Fix nla: don't use server version
-
-  
https://github.com/FreeRDP/FreeRDP/commit/e7ae3f6babc881d893411a5ada9156abe8525b2f
-
-Index: libfreerdp/core/nla.c
---- libfreerdp/core/nla.c.orig
-+++ libfreerdp/core/nla.c
-@@ -1663,14 +1663,18 @@ BOOL nla_send(rdpNla* nla)
- static int nla_decode_ts_request(rdpNla* nla, wStream* s)
- {
-       int length;
-+      UINT32 version = 0;
- 
-       /* TSRequest */
-       if (!ber_read_sequence_tag(s, &length) ||
-           !ber_read_contextual_tag(s, 0, &length, TRUE) ||
--          !ber_read_integer(s, &nla->version))
-+          !ber_read_integer(s, &version))
-       {
-               return -1;
-       }
-+
-+      if (version < nla->version)
-+              nla->version = version;
- 
-       /* [1] negoTokens (NegoData) */
-       if (ber_read_contextual_tag(s, 1, &length, TRUE) != FALSE)
Index: patches/patch-libfreerdp_crypto_tls_c
===================================================================
RCS file: patches/patch-libfreerdp_crypto_tls_c
diff -N patches/patch-libfreerdp_crypto_tls_c
--- patches/patch-libfreerdp_crypto_tls_c       24 Oct 2018 17:10:22 -0000      
1.3
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,17 +0,0 @@
-$OpenBSD: patch-libfreerdp_crypto_tls_c,v 1.3 2018/10/24 17:10:22 jsing Exp $
-
-Stop reaching into libssl internals to send TLS alerts.
-
-Index: libfreerdp/crypto/tls.c
---- libfreerdp/crypto/tls.c.orig
-+++ libfreerdp/crypto/tls.c
-@@ -1020,7 +1020,8 @@ BOOL tls_send_alert(rdpTls* tls)
-        * FIXME: The following code does not work on OpenSSL > 1.1.0 because 
the
-        *        SSL struct is opaqe now
-        */
--#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
-+#if OPENSSL_VERSION_NUMBER < 0x10100000L || \
-+    (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 
0x2080000fL)
- 
-       if (tls->alertDescription != TLS_ALERT_DESCRIPTION_CLOSE_NOTIFY)
-       {
Index: patches/patch-winpr_CMakeLists_txt
===================================================================
RCS file: patches/patch-winpr_CMakeLists_txt
diff -N patches/patch-winpr_CMakeLists_txt
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-winpr_CMakeLists_txt  26 Feb 2021 16:15:51 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: winpr/CMakeLists.txt
+--- winpr/CMakeLists.txt.orig
++++ winpr/CMakeLists.txt
+@@ -101,7 +101,7 @@ else()
+       if(NOT IOS)
+               check_include_files(fcntl.h HAVE_FCNTL_H)
+               check_include_files(unistd.h HAVE_UNISTD_H)
+-              check_include_files(execinfo.h HAVE_EXECINFO_H)
++              #check_include_files(execinfo.h HAVE_EXECINFO_H)
+               check_include_files(inttypes.h HAVE_INTTYPES_H)
+               check_include_files(sys/modem.h HAVE_SYS_MODEM_H)
+               check_include_files(sys/filio.h HAVE_SYS_FILIO_H)
Index: patches/patch-winpr_include_winpr_crt_h
===================================================================
RCS file: patches/patch-winpr_include_winpr_crt_h
diff -N patches/patch-winpr_include_winpr_crt_h
--- patches/patch-winpr_include_winpr_crt_h     28 Apr 2018 19:20:17 -0000      
1.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-$OpenBSD: patch-winpr_include_winpr_crt_h,v 1.2 2018/04/28 19:20:17 landry Exp 
$
-
-__builtin_bswap32
-
-Index: winpr/include/winpr/crt.h
---- winpr/include/winpr/crt.h.orig
-+++ winpr/include/winpr/crt.h
-@@ -68,7 +68,7 @@ static INLINE UINT64 _rotr64(UINT64 value, int shift)
- }
- #endif
- 
--#if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2))
-+#if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))
- 
- #define _byteswap_ulong(_val) __builtin_bswap32(_val)
- #define _byteswap_uint64(_val)        __builtin_bswap64(_val)
Index: patches/patch-winpr_libwinpr_CMakeLists_txt
===================================================================
RCS file: /cvs/ports/x11/freerdp/patches/patch-winpr_libwinpr_CMakeLists_txt,v
retrieving revision 1.1
diff -u -p -r1.1 patch-winpr_libwinpr_CMakeLists_txt
--- patches/patch-winpr_libwinpr_CMakeLists_txt 28 Apr 2018 19:20:17 -0000      
1.1
+++ patches/patch-winpr_libwinpr_CMakeLists_txt 26 Feb 2021 16:15:51 -0000
@@ -3,14 +3,33 @@ $OpenBSD: patch-winpr_libwinpr_CMakeList
 Index: winpr/libwinpr/CMakeLists.txt
 --- winpr/libwinpr/CMakeLists.txt.orig
 +++ winpr/libwinpr/CMakeLists.txt
-@@ -21,6 +21,10 @@ if (APPLE)
-       set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} 
-Wl,-flat_namespace,-undefined,warning")
- endif()
+@@ -17,6 +17,10 @@
+ 
+ include(CheckFunctionExists)
  
 +if (OPENBSD)
-+      set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} 
-L${LOCALBASE}/lib")
++      set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} 
-L/usr/local/lib")
 +endif()
 +
  set(WINPR_DIR ${CMAKE_CURRENT_SOURCE_DIR})
  set(WINPR_SRCS "")
- set(WINPR_LIBS "")
+ set(WINPR_LIBS_PRIVATE "")
+@@ -77,14 +81,17 @@ macro (winpr_definition_add)
+      set (WINPR_DEFINITIONS ${WINPR_DEFINITIONS} PARENT_SCOPE)
+ endmacro()
+ 
++if (!OpenBSD)
+ set(CMAKE_REQUIRED_LIBRARIES rt)
+ check_function_exists(timer_create TIMER_CREATE)
+ check_function_exists(timer_delete TIMER_DELETE)
+ check_function_exists(timer_settime TIMER_SETTIME)
+ check_function_exists(timer_gettime TIMER_GETTIME)
++endif()
++
+ if (TIMER_CREATE AND TIMER_DELETE AND TIMER_SETTIME AND TIMER_GETTIME)
+     add_definitions(-DWITH_POSIX_TIMER)
+-      winpr_library_add_private(rt)
++    winpr_library_add_private(rt)
+ endif()
+ 
+ if (ANDROID)
Index: patches/patch-winpr_libwinpr_synch_CMakeLists_txt
===================================================================
RCS file: patches/patch-winpr_libwinpr_synch_CMakeLists_txt
diff -N patches/patch-winpr_libwinpr_synch_CMakeLists_txt
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-winpr_libwinpr_synch_CMakeLists_txt   26 Feb 2021 16:15:51 
-0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: winpr/libwinpr/synch/CMakeLists.txt
+--- winpr/libwinpr/synch/CMakeLists.txt.orig
++++ winpr/libwinpr/synch/CMakeLists.txt
+@@ -28,7 +28,7 @@ winpr_module_add(
+       timer.c
+       wait.c)
+ 
+-if(FREEBSD)
++if(OPENBSD)
+       winpr_include_directory_add(${EPOLLSHIM_INCLUDE_DIR})
+       winpr_library_add_private(${EPOLLSHIM_LIBS})
+ endif()
Index: patches/patch-winpr_libwinpr_synch_test_CMakeLists_txt
===================================================================
RCS file: patches/patch-winpr_libwinpr_synch_test_CMakeLists_txt
diff -N patches/patch-winpr_libwinpr_synch_test_CMakeLists_txt
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-winpr_libwinpr_synch_test_CMakeLists_txt      26 Feb 2021 
16:15:51 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: winpr/libwinpr/synch/test/CMakeLists.txt
+--- winpr/libwinpr/synch/test/CMakeLists.txt.orig
++++ winpr/libwinpr/synch/test/CMakeLists.txt
+@@ -21,7 +21,7 @@ create_test_sourcelist(${MODULE_PREFIX}_SRCS
+       ${${MODULE_PREFIX}_DRIVER}
+       ${${MODULE_PREFIX}_TESTS})
+ 
+-if(FREEBSD)
++if(EPOLLSHIM)
+       include_directories(${EPOLLSHIM_INCLUDE_DIR})
+ endif()
+ 
Index: patches/patch-winpr_libwinpr_utils_CMakeLists_txt
===================================================================
RCS file: patches/patch-winpr_libwinpr_utils_CMakeLists_txt
diff -N patches/patch-winpr_libwinpr_utils_CMakeLists_txt
--- patches/patch-winpr_libwinpr_utils_CMakeLists_txt   28 Apr 2018 19:20:17 
-0000      1.2
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-$OpenBSD: patch-winpr_libwinpr_utils_CMakeLists_txt,v 1.2 2018/04/28 19:20:17 
landry Exp $
-Index: winpr/libwinpr/utils/CMakeLists.txt
---- winpr/libwinpr/utils/CMakeLists.txt.orig
-+++ winpr/libwinpr/utils/CMakeLists.txt
-@@ -149,6 +149,10 @@ if(WIN32)
-       winpr_library_add(Dbghelp)
- endif()
- 
-+if(BSD)
-+      winpr_library_add(execinfo)
-+endif()
-+
- if(BUILD_TESTING)
-       add_subdirectory(test)
- endif()
Index: patches/patch-winpr_libwinpr_utils_ssl_c
===================================================================
RCS file: patches/patch-winpr_libwinpr_utils_ssl_c
diff -N patches/patch-winpr_libwinpr_utils_ssl_c
--- patches/patch-winpr_libwinpr_utils_ssl_c    28 Apr 2018 19:20:17 -0000      
1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,25 +0,0 @@
-$OpenBSD: patch-winpr_libwinpr_utils_ssl_c,v 1.1 2018/04/28 19:20:17 landry 
Exp $
-
-https://github.com/FreeRDP/FreeRDP/commit/bfe3af4c72b45e33321962644d864843e1c9ce3d
-
-Index: winpr/libwinpr/utils/ssl.c
---- winpr/libwinpr/utils/ssl.c.orig
-+++ winpr/libwinpr/utils/ssl.c
-@@ -279,7 +279,7 @@ static BOOL CALLBACK _winpr_openssl_initialize(PINIT_O
- 
-       if (flags & WINPR_SSL_INIT_ENABLE_FIPS)
-       {
--#if (OPENSSL_VERSION_NUMBER < 0x10001000L)
-+#if (OPENSSL_VERSION_NUMBER < 0x10001000L) || defined(LIBRESSL_VERSION_NUMBER)
-               WLog_ERR(TAG, "Openssl fips mode ENable not available on 
openssl versions less than 1.0.1!");
- #else
-               WLog_DBG(TAG, "Ensuring openssl fips mode is ENabled");
-@@ -348,7 +348,7 @@ BOOL winpr_CleanupSSL(DWORD flags)
- 
- BOOL winpr_FIPSMode(void)
- {
--#if (OPENSSL_VERSION_NUMBER < 0x10001000L)
-+#if (OPENSSL_VERSION_NUMBER < 0x10001000L) || defined(LIBRESSL_VERSION_NUMBER)
-       return FALSE;
- #else
-       return (FIPS_mode() == 1);
Index: patches/patch-winpr_libwinpr_utils_trio_triodef_h
===================================================================
RCS file: 
/cvs/ports/x11/freerdp/patches/patch-winpr_libwinpr_utils_trio_triodef_h,v
retrieving revision 1.1
diff -u -p -r1.1 patch-winpr_libwinpr_utils_trio_triodef_h
--- patches/patch-winpr_libwinpr_utils_trio_triodef_h   7 Nov 2015 05:55:08 
-0000       1.1
+++ patches/patch-winpr_libwinpr_utils_trio_triodef_h   26 Feb 2021 16:15:51 
-0000
@@ -1,12 +1,14 @@
 $OpenBSD: patch-winpr_libwinpr_utils_trio_triodef_h,v 1.1 2015/11/07 05:55:08 
ajacoutot Exp $
---- winpr/libwinpr/utils/trio/triodef.h.orig   Thu Oct 29 07:05:37 2015
-+++ winpr/libwinpr/utils/trio/triodef.h        Thu Oct 29 07:05:59 2015
+
+Index: winpr/libwinpr/utils/trio/triodef.h
+--- winpr/libwinpr/utils/trio/triodef.h.orig
++++ winpr/libwinpr/utils/trio/triodef.h
 @@ -88,7 +88,7 @@
- # endif
+ #endif
  #endif
  
--#if defined(__NetBSD__)
-+#if defined(__NetBSD__) || defined(__OpenBSD__)
- # define TRIO_PLATFORM_UNIX
+-#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
++#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) || 
defined(__OpenBSD__)
+ #define TRIO_PLATFORM_UNIX
  #endif
  
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/x11/freerdp/pkg/PLIST,v
retrieving revision 1.8
diff -u -p -r1.8 PLIST
--- pkg/PLIST   28 Apr 2018 19:20:17 -0000      1.8
+++ pkg/PLIST   26 Feb 2021 16:15:51 -0000
@@ -24,7 +24,10 @@ include/freerdp2/freerdp/channels/
 include/freerdp2/freerdp/channels/audin.h
 include/freerdp2/freerdp/channels/channels.h
 include/freerdp2/freerdp/channels/cliprdr.h
+include/freerdp2/freerdp/channels/disp.h
+include/freerdp2/freerdp/channels/echo.h
 include/freerdp2/freerdp/channels/encomsp.h
+include/freerdp2/freerdp/channels/geometry.h
 include/freerdp2/freerdp/channels/log.h
 include/freerdp2/freerdp/channels/rail.h
 include/freerdp2/freerdp/channels/rdpdr.h
@@ -33,6 +36,8 @@ include/freerdp2/freerdp/channels/rdpgfx
 include/freerdp2/freerdp/channels/rdpsnd.h
 include/freerdp2/freerdp/channels/remdesk.h
 include/freerdp2/freerdp/channels/tsmf.h
+include/freerdp2/freerdp/channels/urbdrc.h
+include/freerdp2/freerdp/channels/video.h
 include/freerdp2/freerdp/channels/wtsvc.h
 include/freerdp2/freerdp/client/
 include/freerdp2/freerdp/client.h
@@ -44,6 +49,8 @@ include/freerdp2/freerdp/client/disp.h
 include/freerdp2/freerdp/client/drdynvc.h
 include/freerdp2/freerdp/client/encomsp.h
 include/freerdp2/freerdp/client/file.h
+include/freerdp2/freerdp/client/geometry.h
+include/freerdp2/freerdp/client/printer.h
 include/freerdp2/freerdp/client/rail.h
 include/freerdp2/freerdp/client/rdpei.h
 include/freerdp2/freerdp/client/rdpgfx.h
@@ -51,6 +58,7 @@ include/freerdp2/freerdp/client/rdpsnd.h
 include/freerdp2/freerdp/client/remdesk.h
 include/freerdp2/freerdp/client/sshagent.h
 include/freerdp2/freerdp/client/tsmf.h
+include/freerdp2/freerdp/client/video.h
 include/freerdp2/freerdp/codec/
 include/freerdp2/freerdp/codec/audio.h
 include/freerdp2/freerdp/codec/bitmap.h
@@ -69,6 +77,7 @@ include/freerdp2/freerdp/codec/progressi
 include/freerdp2/freerdp/codec/region.h
 include/freerdp2/freerdp/codec/rfx.h
 include/freerdp2/freerdp/codec/xcrush.h
+include/freerdp2/freerdp/codec/yuv.h
 include/freerdp2/freerdp/codec/zgfx.h
 include/freerdp2/freerdp/codecs.h
 include/freerdp2/freerdp/constants.h
@@ -80,6 +89,7 @@ include/freerdp2/freerdp/crypto/der.h
 include/freerdp2/freerdp/crypto/er.h
 include/freerdp2/freerdp/crypto/per.h
 include/freerdp2/freerdp/crypto/tls.h
+include/freerdp2/freerdp/display.h
 include/freerdp2/freerdp/dvc.h
 include/freerdp2/freerdp/error.h
 include/freerdp2/freerdp/event.h
@@ -93,8 +103,11 @@ include/freerdp2/freerdp/gdi/gfx.h
 include/freerdp2/freerdp/gdi/pen.h
 include/freerdp2/freerdp/gdi/region.h
 include/freerdp2/freerdp/gdi/shape.h
+include/freerdp2/freerdp/gdi/video.h
 include/freerdp2/freerdp/graphics.h
+include/freerdp2/freerdp/heartbeat.h
 include/freerdp2/freerdp/input.h
+include/freerdp2/freerdp/license.h
 include/freerdp2/freerdp/listener.h
 include/freerdp2/freerdp/locale/
 include/freerdp2/freerdp/locale/keyboard.h
@@ -113,14 +126,17 @@ include/freerdp2/freerdp/server/
 include/freerdp2/freerdp/server/audin.h
 include/freerdp2/freerdp/server/channels.h
 include/freerdp2/freerdp/server/cliprdr.h
+include/freerdp2/freerdp/server/disp.h
 include/freerdp2/freerdp/server/drdynvc.h
 include/freerdp2/freerdp/server/echo.h
 include/freerdp2/freerdp/server/encomsp.h
+include/freerdp2/freerdp/server/rail.h
 include/freerdp2/freerdp/server/rdpdr.h
 include/freerdp2/freerdp/server/rdpei.h
 include/freerdp2/freerdp/server/rdpgfx.h
 include/freerdp2/freerdp/server/rdpsnd.h
 include/freerdp2/freerdp/server/remdesk.h
+include/freerdp2/freerdp/server/server-common.h
 include/freerdp2/freerdp/server/shadow.h
 include/freerdp2/freerdp/session.h
 include/freerdp2/freerdp/settings.h
@@ -128,7 +144,6 @@ include/freerdp2/freerdp/svc.h
 include/freerdp2/freerdp/types.h
 include/freerdp2/freerdp/update.h
 include/freerdp2/freerdp/utils/
-include/freerdp2/freerdp/utils/msusb.h
 include/freerdp2/freerdp/utils/passphrase.h
 include/freerdp2/freerdp/utils/pcap.h
 include/freerdp2/freerdp/utils/profiler.h
@@ -190,6 +205,7 @@ include/winpr2/winpr/sspi.h
 include/winpr2/winpr/sspicli.h
 include/winpr2/winpr/stream.h
 include/winpr2/winpr/string.h
+include/winpr2/winpr/strlst.h
 include/winpr2/winpr/synch.h
 include/winpr2/winpr/sysinfo.h
 include/winpr2/winpr/tchar.h

Attachment: epoll-shim.tgz
Description: application/tar-gz

Reply via email to