From cf1e416e5db97f1673521a63dacaa1487fb875d7 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Tue, 2 Oct 2007 15:56:10 +0200 Subject: [PATCH] Make it compile on FreeBSD. This was easier than expected. Only two items needed fixing: - signal.h has to be included for several files that use signals. - The __used and __packed macros are already defined on FreeBSD which leads to an error at compile time. Fortunately paraslash doesn't use these macros at all, so we can simply remove them. --- FEATURES | 2 +- afs.c | 1 + command.c | 1 + gcc-compat.h | 2 -- gui.c | 2 +- playlist_selector.c | 1 + server.c | 1 + 7 files changed, 6 insertions(+), 4 deletions(-) diff --git a/FEATURES b/FEATURES index 30e778ba..57fdb386 100644 --- a/FEATURES +++ b/FEATURES @@ -3,7 +3,7 @@ Features ------------------------------------------------------------------------------ - * Linux and Mac OS support + * Runs on Linux, Mac OS, FreeBSD and probably other Unixes. * mp3, oggvorbis, aac(m4a) support * local or remote http, dccp, and ortp network audio streaming * volume normalizer diff --git a/afs.c b/afs.c index f40e0224..b7d27927 100644 --- a/afs.c +++ b/afs.c @@ -6,6 +6,7 @@ /** \file afs.c Paraslash's audio file selector. */ +#include #include #include "server.cmdline.h" #include "para.h" diff --git a/command.c b/command.c index 072b972c..e33bae61 100644 --- a/command.c +++ b/command.c @@ -6,6 +6,7 @@ /** \file command.c does client authentication and executes server commands */ +#include #include #include #include diff --git a/gcc-compat.h b/gcc-compat.h index 5fea55d5..c4e43107 100644 --- a/gcc-compat.h +++ b/gcc-compat.h @@ -1,9 +1,7 @@ # define inline inline __attribute__ ((always_inline)) # define __noreturn __attribute__ ((noreturn)) # define __malloc __attribute__ ((malloc)) -# define __used __attribute__ ((used)) # define __a_unused __attribute__ ((unused)) -# define __packed __attribute__ ((packed)) # define likely(x) __builtin_expect (!!(x), 1) # define unlikely(x) __builtin_expect (!!(x), 0) /* diff --git a/gui.c b/gui.c index d8e20034..f884e864 100644 --- a/gui.c +++ b/gui.c @@ -6,9 +6,9 @@ /** \file gui.c ncurses-based interface for paraslash */ +#include #include #include - #include "gui.cmdline.h" #include "para.h" #include "gui.h" diff --git a/playlist_selector.c b/playlist_selector.c index 6866dafb..6a74a922 100644 --- a/playlist_selector.c +++ b/playlist_selector.c @@ -6,6 +6,7 @@ /** \file playlist_selector.c The playlist audio file selector of paraslash */ +#include #include "para.h" #include "afh.h" #include "server.h" diff --git a/server.c b/server.c index d98e9603..33478724 100644 --- a/server.c +++ b/server.c @@ -15,6 +15,7 @@ * */ +#include #include #include -- 2.39.5