Patch by Thomas Bernard to fix compilation on FreeBSD.
Thanks! Fixes #50. git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2173 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
0eaf3fce96
commit
9c6f343215
11
src/Makefile
11
src/Makefile
@ -360,8 +360,15 @@ endif
|
||||
|
||||
# Compiles a regular linux executable for the native platform
|
||||
BIN = ../bin/grafx2
|
||||
COPT = -W -Wall -Wdeclaration-after-statement -std=c99 -c -g $(shell sdl-config --cflags) $(TTFCOPT) $(LUACOPT) $(JOYCOPT) -O$(OPTIM) $(shell pkg-config --cflags libpng) -D_XOPEN_SOURCE=700
|
||||
LOPT = $(shell sdl-config --libs) -lSDL_image $(TTFLOPT) $(shell pkg-config --libs libpng) $(LUALOPT) -lm
|
||||
COPT = -W -Wall -Wdeclaration-after-statement -std=c99 -c -g $(shell sdl-config --cflags) $(TTFCOPT) $(LUACOPT) $(JOYCOPT) -O$(OPTIM)
|
||||
COPT += $(shell pkg-config --cflags libpng)
|
||||
ifneq ($(PLATFORM), FreeBSD)
|
||||
COPT += -D_XOPEN_SOURCE=700
|
||||
endif
|
||||
LOPT = $(shell sdl-config --libs) -lSDL_image $(TTFLOPT)
|
||||
LOPT += $(shell pkg-config --libs libpng)
|
||||
LOPT += $(LUALOPT) -lm
|
||||
LOPT += -liconv
|
||||
CC = gcc
|
||||
OBJDIR = ../obj/unix
|
||||
FCLOPT = -lfontconfig
|
||||
|
||||
@ -80,7 +80,7 @@
|
||||
#import <corefoundation/corefoundation.h>
|
||||
#import <sys/param.h>
|
||||
#elif defined(__FreeBSD__)
|
||||
#import <sys/param.h>
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@ -727,6 +727,7 @@ void Zoom_a_line(byte* original_line, byte* zoomed_line,
|
||||
#if defined(__OpenBSD__)
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <sys/sysctl.h>
|
||||
#elif defined(__BEOS__) || defined(__HAIKU__)
|
||||
#include <kernel/OS.h>
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
// We don't use autoconf and all that in grafx2, so let's do the config here ...
|
||||
#if defined(__macosx__) || defined(__FreeBSD__) || defined(__OpenBSD__) // MacOS X is POSIX compliant
|
||||
#define MOUNTED_GETMNTINFO
|
||||
#if defined(__macosx__)
|
||||
#if defined(__macosx__) || defined(__FreeBSD__)
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
#if defined(__OpenBSD__)
|
||||
@ -462,7 +462,7 @@ read_file_system_list (bool need_fs_type)
|
||||
me = malloc (sizeof *me);
|
||||
me->me_devname = strdup (fsp->f_mntfromname);
|
||||
me->me_mountdir = strdup (fsp->f_mntonname);
|
||||
#if defined(__macosx__) || defined(__OpenBSD__)
|
||||
#if defined(__macosx__) || defined(__OpenBSD__) || defined(__FreeBSD__)
|
||||
me->me_type = fsp->f_fstypename;
|
||||
#else
|
||||
me->me_type = fsp->fs_typename;
|
||||
|
||||
@ -36,7 +36,7 @@
|
||||
#import <corefoundation/corefoundation.h>
|
||||
#import <sys/param.h>
|
||||
#elif defined(__FreeBSD__)
|
||||
#import <sys/param.h>
|
||||
#include <sys/param.h>
|
||||
#elif defined(__MINT__)
|
||||
#include <mint/osbind.h>
|
||||
#include <mint/sysbind.h>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user