From bug-request at octave dot org Thu Feb 10 12:31:16 2005 Subject: [PATCH] compilation error if neither HAVE_USLEEP nor HAVE_SELECT are defined From: Driss Ghaddab To: bug at octave dot org Date: Thu, 10 Feb 2005 19:33:59 +0100 Bug report for Octave 2.1.64 configured for i686-pc-linux-gnu Description: ----------- * If the configuration process does not define HAVE_USLEEP nor HAVE_SELECT, the compilation stops with the following error: octave_usleep() cutils.c: In function `octave_usleep': cutils.c:108: error: `fd' undeclared (first use in this function) cutils.c:108: error: (Each undeclared identifier is reported only once cutils.c:108: error: for each function it appears in.) cutils.c:104: warning: unused variable `pfd' Repeat-By: --------- * I had to manually change config.h to uncomment HAVE_SELECT and HAVE_USLEEP to trigger this bug. Fix: --- The following patch fixes the problem: it just renames fd to pfd: Index: src/cutils.c =================================================================== RCS file: /cvs/octave/src/cutils.c,v retrieving revision 1.19 diff -p -u -r1.19 cutils.c --- a/src/cutils.c 31 Oct 2003 14:42:07 -0000 1.19 +++ b/src/cutils.c 10 Feb 2005 17:39:36 -0000 at @ -105,7 +105,7 @@ octave_usleep (unsigned int useconds) int delay = usec / 1000; if (delay > 0) - poll (&fd, 0, delay); + poll (&pfd, 0, delay); } #endif ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------