freebsd-ports/emulators/mupen64-gln64/files/patch-winlnxdefs.h
Dirk Meyer 5ae1e528e0 glN64 graphics plugin for Mupen64
-
Mupen64 is a highly portable Nintendo 64 emulator. It has been developed
on/for Linux originally but has already been ported successfully to other
operating systems. The program can easily be ported to all operating systems
supported by the SDL library.

In its current state, the emulator is highly compatible and uses a plugin
system. With the correct plugins ("correct" can be computer dependent), it
can achieve nearly perfect graphics and sound in many games.

WWW: http://mupen64.emulation64.com/

PR:		71895
Submitted by:	Travis Poppe
2004-10-12 05:00:24 +00:00

24 lines
724 B
C

--- winlnxdefs.h.orig Thu Oct 16 01:01:08 2003
+++ winlnxdefs.h Wed Sep 22 05:32:54 2004
@@ -30,7 +30,9 @@
#ifndef WINLNXDEFS_H
#define WINLNXDEFS_H
+#ifndef __FreeBSD__
#include <features.h> // we want GNU extensions
+#endif
#include <dlfcn.h>
#include <errno.h>
#include <limits.h> // PATH_MAX
@@ -113,7 +115,11 @@
{
fprintf( stderr, "(WW) Couldn't get path of .so, trying to get emulator's path\n" );
#endif // __USE_GNU
+#ifndef __FreeBSD__
if (readlink( "/proc/self/exe", path, PATH_MAX ) == -1)
+#else
+ if (readlink( "/proc/curproc/file", path, PATH_MAX ) == -1)
+#endif // __FreeBSD__
{
fprintf( stderr, "(WW) readlink() /proc/self/exe failed: %s\n", strerror( errno ) );
path[0] = '.';