Skip to content

Commit

Permalink
src: Minimal change to fix build on linux x11
Browse files Browse the repository at this point in the history
Only supported on 32 bit ... lots of stuff depends on
that.

Signed-off-by: Sylvain Munaut <[email protected]>
  • Loading branch information
smunaut committed Jan 14, 2021
1 parent 864cd8d commit 8179aa2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#
CC= gcc # gcc or g++

CFLAGS=-g -Wall -DNORMALUNIX -DLINUX # -DUSEASM
CFLAGS=-g -m32 -Wall -DNORMALUNIX -DLINUX # -DUSEASM
LDFLAGS=-L/usr/X11R6/lib
LIBS=-lXext -lX11 -lnsl -lm
LIBS=-lXext -lX11 -lm

# subdirectory for objects
O=linux
Expand Down Expand Up @@ -92,4 +92,4 @@ $(O)/%.o: %.c

#############################################################
#
#############################################################
#############################################################
2 changes: 1 addition & 1 deletion src/i_sound.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ static const char __attribute__((unused))
rcsid[] = "$Id: i_unix.c,v 1.5 1997/02/03 22:45:10 b1 Exp $";


#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
Expand Down Expand Up @@ -165,7 +166,6 @@ myioctl
int* arg )
{
int rc;
extern int errno;

rc = ioctl(fd, command, arg);
if (rc < 0)
Expand Down
4 changes: 2 additions & 2 deletions src/i_video.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ int XShmGetEventBase( Display* dpy ); // problems with g++?
#include <sys/socket.h>

#include <netinet/in.h>
#include <errnos.h>
#include <errno.h>
#include <signal.h>

#include "doomstat.h"
Expand Down Expand Up @@ -668,7 +668,6 @@ void grabsharedmemory(int size)
id = shmget((key_t)key, size, IPC_CREAT|0777);
if (id==-1)
{
extern int errno;
fprintf(stderr, "errno=%d\n", errno);
I_Error("Could not get any shared memory");
}
Expand Down Expand Up @@ -819,6 +818,7 @@ void I_InitGraphics(void)
attribmask,
&attribs );

XInstallColormap(X_display, X_cmap);
XDefineCursor(X_display, X_mainWindow,
createnullcursor( X_display, X_mainWindow ) );

Expand Down

0 comments on commit 8179aa2

Please sign in to comment.