changeset 778:3b9aa5717c76

* include/config.h: Make random use rand on FreeBSD. * include/system.h: For FreeBSD include param.h so we get the aliases. #Undefine printf so stdio.h will compile. printf is not used anywhere.
author asl
date Fri, 28 Feb 2003 09:25:22 +0000
parents 2bcd1b710e09
children 25da555852b2
files packages/net/snmp/lib/current/ChangeLog packages/net/snmp/lib/current/include/config.h packages/net/snmp/lib/current/include/system.h
diffstat 3 files changed, 22 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/packages/net/snmp/lib/current/ChangeLog
+++ b/packages/net/snmp/lib/current/ChangeLog
@@ -1,3 +1,9 @@
+2003-02-28  Andrew Lunn  <andrew.lunn@ascom.ch>
+
+	* include/config.h: Make random use rand on FreeBSD.
+	* include/system.h: For FreeBSD include param.h so we get the aliases.
+	#Undefine printf so stdio.h will compile. printf is not used anywhere.
+
 2003-02-24  Jonathan Larmour  <jifl@eCosCentric.com>
 
 	* cdl/snmplib.cdl: Add doc link.
--- a/packages/net/snmp/lib/current/include/config.h
+++ b/packages/net/snmp/lib/current/include/config.h
@@ -1157,7 +1157,14 @@ CONNECTION WITH THE USE OR PERFORMANCE O
 #define srandom(s) srand48(s)
 #else
 #ifdef HAVE_RAND
+#ifdef __ECOS
+#include <pkgconf/system.h>
+#ifndef CYGPKG_NET_FREEBSD_STACK
+
 #define random rand
+
+#endif //CYGPKG_NET_FREEBSD_STACK
+#endif // __ECOS
 #define srandom(s) srand(s)
 #endif
 #endif
@@ -1221,7 +1228,7 @@ CONNECTION WITH THE USE OR PERFORMANCE O
 #define HAVE_SYS_FILE_H                         0
 #define HAVE_KSTAT_H                            0
 #define HAVE_SYS_UN_H                           0
-#define SOCK_MAXADDRLEN                         0
+#define SOCK_MAXADDRLEN                         255
 #define HAVE_SYS_STREAM_H                       0
 #define HAVE_INET_MIB2_H                        0
 #define HAVE_GETPID                             0
--- a/packages/net/snmp/lib/current/include/system.h
+++ b/packages/net/snmp/lib/current/include/system.h
@@ -189,6 +189,14 @@ char *strdup (const char *);
 int setenv (const char *, const char *, int);
 #endif
 
+#ifdef __ECOS
+#include <pkgconf/system.h>
+#ifdef CYGPKG_NET_FREEBSD_STACK
+#include <sys/param.h>
+#undef printf
+#endif //CYGPKG_NET_FREEBSD_STACK
+#endif // __ECOS
+
 #if TIME_WITH_SYS_TIME	
 #	ifdef WIN32
 #		include <sys/timeb.h>