OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-src Date: 03-Oct-2005 17:53:36
Branch: HEAD Handle: 2005100316533600
Modified files:
openpkg-src/snmp snmp.patch snmp.spec
Log:
Fix building under both FreeBSD and Solaris. The problem is that an
"#include <sys/utsname.h>" in a functions scope doesn't work as the two
platforms use "static" inline wrapper functions in the <sys/utsname.h>
header. And a nesting of functions is only allowed in C99.
Summary:
Revision Changes Path
1.10 +18 -2 openpkg-src/snmp/snmp.patch
1.78 +1 -1 openpkg-src/snmp/snmp.spec
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-src/snmp/snmp.patch
============================================================================
$ cvs diff -u -r1.9 -r1.10 snmp.patch
--- openpkg-src/snmp/snmp.patch 26 Jan 2005 14:08:36 -0000 1.9
+++ openpkg-src/snmp/snmp.patch 3 Oct 2005 15:53:36 -0000 1.10
@@ -131,8 +131,8 @@
int calculate_time_diff(struct timeval *,
Index: snmplib/system.c
---- snmplib/system.c.orig 2004-05-20 03:02:09 +0200
-+++ snmplib/system.c 2004-08-07 20:15:20 +0200
+--- snmplib/system.c.orig 2004-12-25 05:51:17.000000000 +0100
++++ snmplib/system.c 2005-10-03 17:46:26.922736673 +0200
@@ -866,7 +866,7 @@
#ifndef HAVE_SETENV
@@ -142,3 +142,19 @@
{
char *cp;
int ret;
+@@ -1063,12 +1063,14 @@
+ * If the release is ordered higher, return 1.
+ * Be aware that "ordered higher" is not a guarantee of correctness.
+ */
++#if HAVE_SYS_UTSNAME_H
++#include <sys/utsname.h>
++#endif
+ int
+ netsnmp_os_prematch(const char *ospmname,
+ const char *ospmrelprefix)
+ {
+ #if HAVE_SYS_UTSNAME_H
+-#include <sys/utsname.h>
+ static int printOSonce = 1;
+ struct utsname utsbuf;
+ if ( 0 != uname(&utsbuf))
@@ .
patch -p0 <<'@@ .'
Index: openpkg-src/snmp/snmp.spec
============================================================================
$ cvs diff -u -r1.77 -r1.78 snmp.spec
--- openpkg-src/snmp/snmp.spec 27 Sep 2005 14:42:21 -0000 1.77
+++ openpkg-src/snmp/snmp.spec 3 Oct 2005 15:53:36 -0000 1.78
@@ -36,7 +36,7 @@
Group: Network
License: BSD
Version: 5.2.1
-Release: 20050927
+Release: 20051003
# package options
%option with_fsl yes
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [email protected]