Fix build failure on kFreeBSD due to undeclared '__FreeBSD_version',

thanks Steven Chamberlain for the patch. Closes: #788709
This commit is contained in:
Michael Biebl
2015-06-15 19:15:59 +00:00
parent fc2286f56e
commit 73a3213f89
3 changed files with 29 additions and 0 deletions

7
debian/changelog vendored
View File

@@ -1,3 +1,10 @@
libgtop2 (2.30.0-2) UNRELEASED; urgency=medium
* Fix build failure on kFreeBSD due to undeclared '__FreeBSD_version',
thanks Steven Chamberlain for the patch. Closes: #788709
-- Michael Biebl <biebl@debian.org> Mon, 15 Jun 2015 21:14:43 +0200
libgtop2 (2.30.0-1) experimental; urgency=medium
[ Jackson Doak ]

View File

@@ -0,0 +1,21 @@
From: Steven Chamberlain <steven@pyro.eu.org>
Date: Mon, 15 Jun 2015 17:09:49 +0100
Support GNU/kFreeBSD by using __FreeBSD_kernel_version here,
rather than simply __FreeBSD_version (which is only defined in
FreeBSD itself).
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=788709
--- a/sysdeps/freebsd/open.c
+++ b/sysdeps/freebsd/open.c
@@ -43,6 +43,10 @@
server->real_ncpu = ncpus - 1;
server->ncpu = MIN(GLIBTOP_NCPU - 1, server->real_ncpu);
+#if defined(__FreeBSD__)
server->os_version_code = __FreeBSD_version;
+#else
+ server->os_version_code = __FreeBSD_kernel_version;
+#endif
}

View File

@@ -1,2 +1,3 @@
02_hurd_stub_backend.patch
03_kfreebsd_installdirs.patch
04_kfreebsd_version.patch