From: Ted Lemon Date: Sun, 15 Mar 1998 21:00:44 +0000 (+0000) Subject: Use DLPI, not sockets. Also, since we're using rand instead of random, use srand... X-Git-Tag: carrel-2~180 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=49e228037f3930481881cf08b57de759ed02cc83;p=thirdparty%2Fdhcp.git Use DLPI, not sockets. Also, since we're using rand instead of random, use srand instead of srandom. --- diff --git a/includes/cf/sunos5-5.h b/includes/cf/sunos5-5.h index f88084f6d..a5b7cd851 100644 --- a/includes/cf/sunos5-5.h +++ b/includes/cf/sunos5-5.h @@ -3,7 +3,8 @@ System dependencies for Solaris 2.x (tested on 2.5 with gcc)... */ /* - * Copyright (c) 1996 The Internet Software Consortium. All rights reserved. + * Copyright (c) 1996, 1998 The Internet Software Consortium. + * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -116,11 +117,12 @@ extern int h_errno; #define NEED_INET_ATON -/* By default, use BSD Socket API for receiving and sending packets. - This actually works pretty well on Solaris, which doesn't censor - the all-ones broadcast address. */ +/* By default, use the DLPI API for receiving and sending packets. */ #if defined (USE_DEFAULT_NETWORK) -# define USE_SOCKETS +# define USE_DLPI +# define USE_DLPI_RAW +# define USE_DLPI_PFMOD +# define DLPI_FIRST_SEND_WAIT 6 #endif #define USE_POLL @@ -135,7 +137,11 @@ extern int h_errno; #define TIME time_t #define GET_TIME(x) time ((x)) +/* Solaris prior to 2.5 didn't have random(). Rather than being clever and + using random() only on versions >2.5, always use rand() and srand(). */ + #define random() rand() +#define srandom(x) srand(x) /* Solaris doesn't provide an endian.h, so we have to do it. */