--- /dev/null
+--- doomlegacy-1.40/doomlegacy_src/linux_x/i_sound.c.orig Fri Mar 7 22:14:51 2003
++++ doomlegacy-1.40/doomlegacy_src/linux_x/i_sound.c Fri Mar 7 22:18:30 2003
+@@ -88,6 +88,7 @@
+ #include <sys/filio.h>
+ #endif
+
++#include <errno.h>
+ #include <fcntl.h>
+ #include <unistd.h>
+ #include <sys/ioctl.h>
+@@ -261,7 +262,6 @@
+ int* arg )
+ {
+ int rc;
+- extern int errno;
+
+ rc = ioctl(fd, command, arg);
+ if (rc < 0)
+--- doomlegacy-1.40/doomlegacy_src/linux_x/sndserv/linux.c.orig Sun Sep 22 00:35:57 2002
++++ doomlegacy-1.40/doomlegacy_src/linux_x/sndserv/linux.c Fri Mar 7 22:22:26 2003
+@@ -39,6 +39,7 @@
+
+ #include <stdlib.h>
+ #include <stdio.h>
++#include <errno.h>
+ #include <fcntl.h>
+ #include <unistd.h>
+ #include <sys/ioctl.h>
+@@ -67,7 +68,6 @@
+ int* arg )
+ {
+ int rc;
+- extern int errno;
+
+ rc = ioctl(fd, command, arg);
+ if (rc < 0)
--- /dev/null
+--- doomlegacy-1.40/doomlegacy_src/linux_x/i_video_xshm.c.orig Fri Mar 7 22:22:56 2003
++++ doomlegacy-1.40/doomlegacy_src/linux_x/i_video_xshm.c Fri Mar 7 22:51:25 2003
+@@ -1619,14 +1619,14 @@
+ if(rendermode==render_soft) {
+ // setup attributes for main window
+ if (vidmode_active) {
+- attribmask = CWColormap | CWSaveUnder | CWBackingStore |
++ attribmask = CWSaveUnder | CWBackingStore |
+ CWEventMask | CWOverrideRedirect;
+
+ attribs.override_redirect = True;
+ attribs.backing_store = NotUseful;
+ attribs.save_under = False;
+ } else
+- attribmask = CWBorderPixel | CWColormap | CWEventMask;
++ attribmask = CWBorderPixel | CWEventMask;
+
+ attribs.event_mask = KeyPressMask | KeyReleaseMask
+ #ifndef POLL_POINTER
+@@ -1634,7 +1634,10 @@
+ #endif
+ | ExposureMask | StructureNotifyMask;
+
++ if( x_pseudo ) {
++ attribmask |= CWColormap;
+ attribs.colormap = X_cmap;
++ }
+ attribs.border_pixel = 0;
+
+ // create the main window
Patch1: %{name}-Makefile.patch
Patch2: %{name}-nosndstat.patch
Patch3: %{name}-sound.patch
+Patch4: %{name}-errno.patch
+Patch5: %{name}-nocmap.patch
BuildRequires: OpenGL-devel
BuildRequires: SDL_mixer-devel
BuildRequires: XFree86-devel
%patch1 -p0
%patch2 -p0
%patch3 -p0
+%patch4 -p1
+%patch5 -p1
%build
mkdir bin