$NetBSD: patch-ac,v 1.4 2006/05/12 12:40:10 joerg Exp $

--- qw/client/gl_vidlinuxglx.c.orig	1999-12-21 18:45:54.000000000 +0000
+++ qw/client/gl_vidlinuxglx.c
@@ -20,7 +20,6 @@ Foundation, Inc., 59 Temple Place - Suit
 #include <termios.h>
 #include <sys/ioctl.h>
 #include <sys/stat.h>
-#include <sys/vt.h>
 #include <stdarg.h>
 #include <stdio.h>
 #include <signal.h>
@@ -560,6 +559,9 @@ extern void gl3DfxSetPaletteEXT(GLuint *
 
 void VID_Init8bitPalette(void) 
 {
+#if defined(__NetBSD__) || defined(__DragonFly__)
+  return;
+#else
 	// Check for 8bit Extensions and initialize them.
 	int i;
 	GLubyte table[256][4];
@@ -580,6 +582,7 @@ void VID_Init8bitPalette(void) 
 	}
 	gl3DfxSetPaletteEXT((GLuint *)table);
 	is8bit = true;
+#endif
 }
 #endif
 
@@ -603,7 +606,12 @@ void VID_Init(unsigned char *palette)
 	Window root;
 	XVisualInfo *visinfo;
 
+	/* For some reason this is called.  It causes trouble for NetBSD 
+	 and sound won't work */
+
+#if !defined(__NetBSD__) && !defined(__DragonFly__)
 	S_Init();
+#endif
 
 	Cvar_RegisterVariable (&vid_mode);
 	Cvar_RegisterVariable (&gl_ztrick);
