trying to compile psxdump
Running slackware 10
celeron 633
gcc compiler
I am trying to compile 2 little programs which are part of cdrdao
Used for copying ps2 games.
The makefile creates the first program cdjob
but I get the following error on the second program psxdump.
root@thunderbolt:/usr/share/psxcopy-0.2# make
gcc -O2 -s -fno-strength-reduce cdjob.c -o cdjob
gcc -O2 -s -fno-strength-reduce psxdump.c -o psxdump
psxdump.c:24: error: conflicting types for `sys_errlist'
/usr/include/bits/sys_errlist.h:28: error: previous declaration of `sys_errlist'
make: *** [psxdump] Error 1
Here is the code snip
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <getopt.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <linux/cdrom.h>
#include <linux/fs.h>
/* Ugly, I know.. */
extern char *sys_errlist[];
typedef unsigned char u8bit;
typedef unsigned short u16bit;
typedef unsigned u32bit;
unsigned char psx_sign[] =
{0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x09, 0x00, 0x01,
0x43, 0x44, 0x30, 0x30, 0x31, 0x01, 0x00, 0x50, 0x4C,
0x41, 0x59, 0x53, 0x54, 0x41, 0x54, 0x49, 0x4F, 0x4E,
0x20, 0x20, 0x20, 0x20, 0x20};
Here is the makefile
# Makefile - Fabio Baracca
#
CC = gcc
#-DDEBUG #-ggdb
CFLAGS = -O2 -s -fno-strength-reduce
LDFLAGS =
CNTFLGS =
EDITOR = joe
default: cdjob psxdump remainder
cdjob: cdjob.c
$(CC) $(CFLAGS) cdjob.c -o cdjob
psxdump: psxdump.c
$(CC) $(CFLAGS) psxdump.c -o psxdump
remainder:
@echo "Make completed."
@echo "Please also execute make batchconf to revise configuration of batch files."
batchconf:
$(EDITOR) write-psx
$(EDITOR) read-psx
clean:
rm -f *~
rm -f *.o
distclean:
rm -f psxdump
rm -f cdjobroot@thunderbolt:/usr/doc/cdrdao-1.1.9/contrib/psxcopy-0.2#
|