[Pkg-net-snmp-commits] [pkg-net-snmp] 23/27: Fix kfreebsd builds with kernel headers >= 10

Hideki Yamane henrich at moszumanska.debian.org
Sun Aug 28 02:19:49 UTC 2016


This is an automated email from the git hooks/post-receive script.

henrich pushed a commit to branch patch-queue/master
in repository pkg-net-snmp.

commit c2d0f7157acd4759b98cec9d7d3a466e67da9b64
Author: Niko Tyni <ntyni at debian.org>
Date:   Wed Jul 16 21:42:30 2014 +0000

    Fix kfreebsd builds with kernel headers >= 10
    
    This fixes warnings like
    
    In file included from ../../include/net-snmp/net-snmp-config.h:2085:0,
                     from host/data_access/swinst_apt.c:5:
    ../../include/net-snmp/system/kfreebsd.h:5:0: warning: "__FreeBSD_version" redefined [enabled by default]
     #define __FreeBSD_version __FreeBSD_kernel_version
     ^
    In file included from /usr/include/sys/kern/param.h:1:0,
                     from /usr/include/osreldate.h:1,
                     from ../../include/net-snmp/system/kfreebsd.h:4,
                     from ../../include/net-snmp/net-snmp-config.h:2085,
                     from host/data_access/swinst_apt.c:5:
    /usr/include/sys/kglue/sys/param.h:67:0: note: this is the location of the previous definition
     #define __FreeBSD_version 1000510 /* Master, propagated to newvers */
    
    and makes agent/mibgroup/host/data_access/swrun_kinfo.c use the modern
    kinfo_proc field names.
    
    Bug-Debian: http://bugs.debian.org/753144
    
    Gbp-Pq: Name Fix-kfreebsd-builds-with-kernel-headers-10.patch
---
 include/net-snmp/system/kfreebsd.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/net-snmp/system/kfreebsd.h b/include/net-snmp/system/kfreebsd.h
index dbf7024..cb32758 100644
--- a/include/net-snmp/system/kfreebsd.h
+++ b/include/net-snmp/system/kfreebsd.h
@@ -2,7 +2,9 @@
 #define freebsd6 freebsd6
 
 #include <osreldate.h>
+#if defined(__FreeBSD_kernel_version) && !defined(__FreeBSD_version)
 #define __FreeBSD_version __FreeBSD_kernel_version
+#endif
 
 #include <sys/queue.h>
 #include <sys/_types.h>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-net-snmp/pkg-net-snmp.git



More information about the Pkg-net-snmp-commits mailing list