diff -ru Makefile.org Makefile --- Makefile.org Tue Apr 5 00:41:50 2011 +++ Makefile Tue Nov 8 18:24:28 2011 @@ -278,7 +278,7 @@ # Compiles a regular linux executable for the native platform BIN = ../bin/grafx2 - COPT = -W -Wall -Wdeclaration-after-statement -std=c99 -c -g `sdl-config --cflags` $(TTFCOPT) $(LUACOPT) $(JOYCOPT) $(VKEYCOPT) -O$(OPTIM) + COPT = -W -Wall -Wdeclaration-after-statement -std=c99 -c -g `sdl-config --cflags` $(TTFCOPT) $(LUACOPT) $(JOYCOPT) $(VKEYCOPT) -O$(OPTIM) -I/usr/local/include/libpng LOPT = `sdl-config --libs` -lSDL_image $(TTFLOPT) -lpng $(LUALOPT) -lm # Use gcc for compiling. Use ncc to build a callgraph and analyze the code. CC = gcc diff -ru misc.c.org misc.c --- misc.c.org Sun Feb 6 18:16:48 2011 +++ misc.c Tue Nov 8 18:04:53 2011 @@ -735,7 +735,10 @@ #if defined(__WIN32__) #define _WIN32_WINNT 0x0500 #include -#elif defined(__macosx__) || defined(__FreeBSD__) || defined(__NetBSD__) +#elif defined(__macosx__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) + #if defined(__OpenBSD__) + #include + #endif #include #elif defined(__BEOS__) || defined(__HAIKU__) // sysinfo not implemented @@ -777,7 +780,7 @@ mstt.dwLength = sizeof(MEMORYSTATUS); GlobalMemoryStatus(&mstt); return mstt.dwAvailPhys; -#elif defined(__macosx__) || defined(__FreeBSD__) || defined(__NetBSD__) +#elif defined(__macosx__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) int mib[2]; int maxmem; size_t len; diff -ru mountlist.c.org mountlist.c --- mountlist.c.org Fri Mar 11 18:39:54 2011 +++ mountlist.c Tue Nov 8 18:17:50 2011 @@ -23,11 +23,16 @@ #if(!defined(__WIN32__))&&(!defined(__amigaos4__))&&(!defined(__AROS__))&&(!defined(__MORPHOS__))&&(!defined(__amigaos__)) // We don't use autoconf and all that in grafx2, so let's do the config here ... -#if defined(__macosx__) || defined(__FreeBSD__) // MacOS X is POSIX compliant +#if defined(__macosx__) || defined(__FreeBSD__) || defined(__OpenBSD__) // MacOS X is POSIX compliant #define MOUNTED_GETMNTINFO #if defined(__macosx__) #include #endif +#if defined(__OpenBSD__) + #define HAVE_STRUCT_STATFS_F_FSTYPENAME 1 + #include /* types.h needs this */ + #include +#endif #elif defined(__NetBSD__) #define MOUNTED_GETMNTINFO2 #elif defined(__BEOS__) || defined(__HAIKU__) @@ -463,7 +468,7 @@ me = malloc (sizeof *me); me->me_devname = strdup (fsp->f_mntfromname); me->me_mountdir = strdup (fsp->f_mntonname); -#if defined(__macosx__) +#if defined(__macosx__) || defined(__OpenBSD__) me->me_type = fsp->f_fstypename; #else me->me_type = fsp->fs_typename;