Make forked-daapd build on GNU/kFreeBSD

This commit is contained in:
Julien BLACHE 2010-01-10 17:49:01 +01:00
parent d96cdd7400
commit 79cdb4f9aa
4 changed files with 12 additions and 12 deletions

View File

@ -222,7 +222,7 @@ struct watch_info {
uint32_t cookie;
int libidx;
#if defined(__FreeBSD__)
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
void *priv;
#endif
};

View File

@ -39,7 +39,7 @@
#if defined(__linux__)
# include <sys/inotify.h>
#elif defined(__FreeBSD__)
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
# include <sys/time.h>
# include <sys/event.h>
#endif
@ -415,7 +415,7 @@ process_directory(int libidx, char *path, int flags)
struct stat sb;
#if defined(__linux__)
struct watch_info wi;
#elif defined(__FreeBSD__)
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
struct watch_info *wi;
struct kevent *kev;
#endif
@ -545,7 +545,7 @@ process_directory(int libidx, char *path, int flags)
if (!(flags & F_SCAN_RESCAN))
db_watch_add(&wi);
#elif defined(__FreeBSD__)
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
wi = (struct watch_info *)malloc(sizeof(struct watch_info));
if (!wi)
@ -1040,7 +1040,7 @@ inotify_cb(int fd, short event, void *arg)
#endif /* __linux__ */
#if defined(__FreeBSD__)
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
/* Thread: scan */
static void
kqueue_cb(int fd, short event, void *arg)
@ -1100,7 +1100,7 @@ kqueue_cb(int fd, short event, void *arg)
event_add(&inoev, NULL);
}
#endif /* __FreeBSD__ */
#endif /* __FreeBSD__ || __FreeBSD_kernel__ */
/* Thread: scan */
@ -1152,7 +1152,7 @@ filescanner_init(void)
event_set(&inoev, inofd, EV_READ, inotify_cb, NULL);
#elif defined(__FreeBSD__)
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
inofd = kqueue();
if (inofd < 0)

View File

@ -40,7 +40,7 @@
#if defined(__linux__)
# include <sys/signalfd.h>
#elif defined(__FreeBSD__)
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
# include <sys/time.h>
# include <sys/event.h>
#endif
@ -333,7 +333,7 @@ signal_signalfd_cb(int fd, short event, void *arg)
event_add(&sig_event, NULL);
}
#elif defined(__FreeBSD__)
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
static void
signal_kqueue_cb(int fd, short event, void *arg)
@ -394,7 +394,7 @@ main(int argc, char **argv)
char *pidfile;
sigset_t sigs;
int sigfd;
#ifdef __FreeBSD__
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
struct kevent ke_sigs[4];
#endif
int ret;
@ -610,7 +610,7 @@ main(int argc, char **argv)
event_set(&sig_event, sigfd, EV_READ, signal_signalfd_cb, NULL);
#elif defined(__FreeBSD__)
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
sigfd = kqueue();
if (sigfd < 0)
{

View File

@ -34,7 +34,7 @@
#if defined(__linux__)
# include <endian.h>
# include <byteswap.h>
#elif defined(__FreeBSD__)
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
# include <sys/endian.h>
#endif