diff --git a/src/cmd/ar/ar.c b/src/cmd/ar/ar.c index 74d05d3..e0e7864 100644 --- a/src/cmd/ar/ar.c +++ b/src/cmd/ar/ar.c @@ -38,6 +38,7 @@ # include # include # include +# include # include # include #else diff --git a/src/cmd/ar/archive.h b/src/cmd/ar/archive.h index aaeffa7..5403492 100644 --- a/src/cmd/ar/archive.h +++ b/src/cmd/ar/archive.h @@ -97,7 +97,7 @@ typedef struct { /* Header structure internal format. */ typedef struct { off_t size; /* size of the object in bytes */ - long date; /* date */ + time_t date; /* date */ int lname; /* size of the long name in bytes */ int gid; /* group */ int uid; /* owner */ diff --git a/src/cmd/smux/linux/smux.c b/src/cmd/smux/linux/smux.c index f23c777..6838afc 100644 --- a/src/cmd/smux/linux/smux.c +++ b/src/cmd/smux/linux/smux.c @@ -2,7 +2,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/sys/pic32/gcc-config.mk b/sys/pic32/gcc-config.mk index f52eff6..64c5b76 100644 --- a/sys/pic32/gcc-config.mk +++ b/sys/pic32/gcc-config.mk @@ -33,6 +33,17 @@ ifndef MIPS_GCC_PREFIX endif endif +# Generic MIPS toolchain on *BSD +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# You can build it from sources, as described on page +# http://retrobsd.org/wiki/doku.php/doc/toolchain-mips +# Maybe you can install it from packages one day too. +ifndef MIPS_GCC_PREFIX + ifeq (/usr/local/mips-elf/bin/mips-elf-gcc,$(wildcard /usr/local/mips-elf/bin/mips-elf-gcc)) + MIPS_GCC_PREFIX = /usr/local/mips-elf/bin/mips-elf- + endif +endif + # Mentor Sourcery CodeBench Lite toolchain # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ifndef MIPS_GCC_PREFIX diff --git a/target.mk b/target.mk index 0ce66d8..0dd6aa4 100644 --- a/target.mk +++ b/target.mk @@ -41,6 +41,19 @@ ifeq (/usr/local/mips-gcc-4.8.1/bin/mips-elf-gcc,$(wildcard /usr/local/mips-gcc- endif endif +# Generic MIPS toolchain on *BSD +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# You can build it from sources, as described on page +# http://retrobsd.org/wiki/doku.php/doc/toolchain-mips +# Maybe you can install it from packages one day too. +ifndef GCCPREFIX +ifeq (/usr/local/mips-elf/bin/mips-elf-gcc,$(wildcard /usr/local/mips-elf/bin/mips-elf-gcc)) + GCCPREFIX = /usr/local/mips-elf/bin/mips-elf- + LDFLAGS = + INCLUDES = +endif +endif + # Mentor Sourcery CodeBench Lite toolchain # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # You can download a Linux or Windows binary package from diff --git a/tools/configsys/Makefile b/tools/configsys/Makefile index d51e972..f100ec2 100644 --- a/tools/configsys/Makefile +++ b/tools/configsys/Makefile @@ -2,6 +2,7 @@ BIN = config SRCS = main.cpp config.cpp mapping.cpp device.cpp cluster.cpp util.cpp core.cpp gstore.cpp OBJS = main.o config.o mapping.o device.o cluster.o util.o core.o gstore.o +CXX = g++ CXXFLAGS = -Wall -O all: .depend $(BIN) diff --git a/tools/fsutil/block.c b/tools/fsutil/block.c index 1bf2025..aa29351 100644 --- a/tools/fsutil/block.c +++ b/tools/fsutil/block.c @@ -22,6 +22,7 @@ * this software. */ #include +#include #include "bsdfs.h" extern int verbose; diff --git a/tools/fsutil/bsdfs.h b/tools/fsutil/bsdfs.h index 8ced552..06ed008 100644 --- a/tools/fsutil/bsdfs.h +++ b/tools/fsutil/bsdfs.h @@ -77,7 +77,7 @@ typedef struct { unsigned ilock; /* lock during I list manipulation */ unsigned fmod; /* super block modified flag */ unsigned ronly; /* mounted read-only flag */ - long utime; /* current date of last update */ + time_t utime; /* current date of last update */ unsigned tfree; /* total free blocks */ unsigned tinode; /* total free inodes */ char fsmnt [MAXMNTLEN]; /* ordinary file mounted on */ @@ -127,9 +127,9 @@ typedef struct { #define SYS_IMMUTABLE 0x0200 /* file may not be changed */ #define SYS_APPEND 0x0400 /* writes to file may only append */ - long atime; /* time last accessed */ - long mtime; /* time last modified */ - long ctime; /* time created */ + time_t atime; /* time last accessed */ + time_t mtime; /* time last modified */ + time_t ctime; /* time created */ } fs_inode_t; typedef struct { diff --git a/tools/fsutil/file.c b/tools/fsutil/file.c index 5d46af2..5a11c36 100644 --- a/tools/fsutil/file.c +++ b/tools/fsutil/file.c @@ -23,6 +23,7 @@ */ #include #include +#include #include "bsdfs.h" extern int verbose; diff --git a/tools/fsutil/manifest.c b/tools/fsutil/manifest.c index da20ec2..a13c05f 100644 --- a/tools/fsutil/manifest.c +++ b/tools/fsutil/manifest.c @@ -131,10 +131,17 @@ static void add_entry (manifest_t *m, int filetype, char *path, char *link, /* * Compare two entries of file traverse scan. */ +#ifdef __FreeBSD__ +static int ftsent_compare (const FTSENT * const *a, const FTSENT *const *b) +{ + return strcmp((*a)->fts_name, (*b)->fts_name); +} +#else static int ftsent_compare (const FTSENT **a, const FTSENT **b) { return strcmp((*a)->fts_name, (*b)->fts_name); } +#endif /* * Scan the directory and create a manifest from it's contents. diff --git a/tools/virtualmips/debug.c b/tools/virtualmips/debug.c index 472bd29..26f0668 100644 --- a/tools/virtualmips/debug.c +++ b/tools/virtualmips/debug.c @@ -13,6 +13,7 @@ #define _GNU_SOURCE #include +#include #include #include "vm.h"