]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
Fix prototype of random() and move to stdlib.h
authorMichael Brown <mcb30@etherboot.org>
Fri, 22 Dec 2006 01:44:51 +0000 (01:44 +0000)
committerMichael Brown <mcb30@etherboot.org>
Fri, 22 Dec 2006 01:44:51 +0000 (01:44 +0000)
src/core/misc.c
src/include/etherboot.h
src/include/stdlib.h

index 3930d265acbd41379ee452c517836efac2e8c036..19d114cce8c0745909521e17ae9a77f35fc3326a 100644 (file)
@@ -4,6 +4,7 @@ MISC Support Routines
 
 #include "etherboot.h"
 #include "console.h"
+#include <stdlib.h>
 
 /**************************************************************************
 IPCHKSUM - Checksum IP Header
@@ -59,7 +60,7 @@ uint16_t add_ipchksums(unsigned long offset, uint16_t sum, uint16_t new)
 /**************************************************************************
 RANDOM - compute a random number between 0 and 2147483647L or 2147483562?
 **************************************************************************/
-int32_t random(void)
+long int random(void)
 {
        static int32_t seed = 0;
        int32_t q;
index b26379c265837db258f3b261d0a4a29a03be7203..82519fdf4e5e9242d04cb7cca6190bcce0e0f2ea 100644 (file)
@@ -208,7 +208,6 @@ extern int decode_rfc1533 P((unsigned char *, unsigned int, unsigned int, int));
 #define RAND_MAX 2147483647L
 extern uint16_t ipchksum P((const void *ip, unsigned long len));
 extern uint16_t add_ipchksums P((unsigned long offset, uint16_t sum, uint16_t new));
-extern int32_t random P((void));
 extern long rfc2131_sleep_interval P((long base, int exp));
 extern void cleanup P((void));
 
index d71ee1ab2a022928ac3ef5848a2d47ae9355b1af..2b6471e1cd4e8042d65992b41014493dbdda7e66 100644 (file)
@@ -6,6 +6,7 @@ extern void * realloc ( void *old_ptr, size_t new_size );
 extern void * malloc ( size_t size );
 extern void free ( void *ptr );
 extern int system ( const char *command );
+extern long int random ( void );
 
 /**
  * Allocate cleared memory