Build errors on AIX 4.2.1: nanosleep

Ben Lindstrom mouring at etoh.eviladmin.org
Sat Feb 1 13:23:48 EST 2003


On Sat, 1 Feb 2003, Darren Tucker wrote:
> Hi All.
> 	There are still build errors for scp on AIX 4.2.1 due to lack of
> nanosleep (which you can see them live and in colour at [1]).  The
> attached patch fixes this by using the equivalent nsleep function on AIX
> if it exists and nanosleep doesn't.
>
[..]

diff -u -r1.6 port-aix.h
--- openbsd-compat/port-aix.h	7 Jul 2002 02:17:36 -0000	1.6
+++ openbsd-compat/port-aix.h	1 Feb 2003 01:49:56 -0000
@@ -25,5 +25,16 @@
  */

 #ifdef _AIX
+
+/* AIX 4.2.x doesn't have nanosleep but does have nsleep which is equivalent */
+#if !defined(HAVE_NANOSLEEP) && defined(HAVE_NSLEEP)
+# define nanosleep nsleep
+#endif
+
[..]

Ok if I change it to:

#define nanosleep(req, rem) nsleep(req, rem)


I like to see function renaming at a glance.  Plus it saves us from wierd
bugs down the road (not that I see 'nanosleep' ever being used as a
function call or structure =).

- Ben




More information about the openssh-unix-dev mailing list