[MPlayer-dev-eng] [PATCH] Remove Win32 codecs support for OpenBSD

Brad Smith brad at comstyle.com
Thu Mar 3 03:32:39 EET 2022


OpenBSD has not used the Win32 codecs for 12 years and the LDT support
was removed 6 years ago.


Index: configure
===================================================================
--- configure	(revision 38359)
+++ configure	(working copy)
@@ -7258,7 +7262,7 @@
 echocheck "Win32 codecs"
 if test "$_win32dll" = auto ; then
   _win32dll=no
-  if x86_32 && ! qnx; then
+  if x86_32 && ! qnx  && ! openbsd; then
     _win32dll=yes
   fi
 fi
@@ -7304,7 +7308,7 @@
   _real=no
   res_comment="dynamic loader support needed"
   if test "$_dl" = yes || test "$_win32dll" = yes &&
-     (linux || freebsd || netbsd || openbsd || dragonfly || darwin || win32 || os2) ; then
+     (linux || freebsd || netbsd || dragonfly || darwin || win32 || os2) ; then
     _real=yes
   fi
 fi
Index: libmpcodecs/ad_realaud.c
===================================================================
--- libmpcodecs/ad_realaud.c	(revision 38359)
+++ libmpcodecs/ad_realaud.c	(working copy)
@@ -78,7 +78,7 @@
 //	exit(1);
 }
 
-#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
 void ___brk_addr(void);
 void ___brk_addr(void) {exit(0);}
 char **__environ={NULL};
Index: loader/ldt_keeper.c
===================================================================
--- loader/ldt_keeper.c	(revision 38359)
+++ loader/ldt_keeper.c	(working copy)
@@ -52,7 +52,7 @@
 int modify_ldt(int func, void *ptr, unsigned long bytecount);
 #endif
 #else
-#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
+#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
 #include <machine/segments.h>
 #include <machine/sysarch.h>
 #elif defined(__APPLE__)
@@ -162,7 +162,7 @@
 #endif
 #endif
 
-#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__APPLE__)
+#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__APPLE__)
 static void LDT_EntryToBytes( unsigned long *buffer, const struct modify_ldt_ldt_s *content )
 {
     *buffer++ = ((content->base_addr & 0x0000ffff) << 16) |
@@ -220,7 +220,7 @@
 	perror("install_fs");
 	printf("Couldn't install fs segment, expect segfault\n");
     }
-#elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__APPLE__)
+#elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__APPLE__)
     {
         unsigned long d[2];
 
@@ -237,9 +237,6 @@
             perror("install_fs");
 	    printf("Couldn't install fs segment, expect segfault\n");
             printf("Did you reconfigure the kernel with \"options USER_LDT\"?\n");
-#ifdef __OpenBSD__
-	    printf("On newer OpenBSD systems did you set machdep.userldt to 1?\n");
-#endif
         }
     }
 #elif defined(__svr4__)


More information about the MPlayer-dev-eng mailing list