# HG changeset patch # User Roland McGrath # Date 770707488 0 # Node ID fd03010db0c68944ac89118053c7befbb63b8248 # Parent 96fa8af2fac8c8f6f3f225f436056eb5a8601b15 Put #include of errno.h and decl of errno before #ifndef HAVE_GETLOADAVG. diff -r 96fa8af2fac8 -r fd03010db0c6 src/getloadavg.c --- a/src/getloadavg.c Sat Jun 04 00:16:37 1994 +0000 +++ b/src/getloadavg.c Sat Jun 04 05:24:48 1994 +0000 @@ -1,5 +1,5 @@ /* Get the system load averages. - Copyright (C) 1985, 86, 87, 88, 89, 91, 92, 93 + Copyright (C) 1985, 86, 87, 88, 89, 91, 92, 93, 1994 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -80,9 +80,17 @@ #endif #endif +/* Exclude all the code except the test program at the end + if the system has its own `getloadavg' function. -/* Exclude all the code except the test program at the end - if the system has its own `getloadavg' function. */ + The declaration of `errno' is needed by the test program + as well as the function itself, so it comes first. */ + +#include + +#ifndef errno +extern int errno; +#endif #ifndef HAVE_GETLOADAVG @@ -331,11 +339,6 @@ #endif #include -#include - -#ifndef errno -extern int errno; -#endif /* LOAD_AVE_TYPE should only get defined if we're going to use the nlist method. */