[gnome-builder] log: make it work on FreeBSD
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] log: make it work on FreeBSD
- Date: Sun, 11 Jan 2015 03:19:55 +0000 (UTC)
commit c561fb3e4e19dd75869b8741ae92bb7aec888c04
Author: Ting-Wei Lan <lantw src gnome org>
Date: Tue Dec 30 22:44:18 2014 +0800
log: make it work on FreeBSD
https://bugzilla.gnome.org/show_bug.cgi?id=742118
src/log/gb-log.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/log/gb-log.c b/src/log/gb-log.c
index 0936dc5..7f0b150 100644
--- a/src/log/gb-log.c
+++ b/src/log/gb-log.c
@@ -20,7 +20,9 @@
# include <sys/utsname.h>
# include <sys/types.h>
# include <sys/syscall.h>
-#endif /* __linux__ */
+#elif defined __FreeBSD__
+# include <sys/utsname.h>
+#endif /* !__linux__ && !__FreeBSD__ */
#include <glib.h>
#include <string.h>
@@ -169,7 +171,7 @@ gb_log_init (gboolean stdout_,
g_ptr_array_add (channels, channel);
}
-#ifdef __linux__
+#if defined __linux__ || defined __FreeBSD__
uname (&u);
memcpy (hostname, u.nodename, sizeof (hostname));
#else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]