Imported Upstream version 1.8.7
[debian/sudo] / compat / nanosleep.c
index 23e3b9e16011cebe316c850a0f1632d3559a002d..6b8b388c3878c70e260680b26b878a6157741246 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009-2011 Todd C. Miller <Todd.Miller@courtesan.com>
+ * Copyright (c) 2009-2011, 2013 Todd C. Miller <Todd.Miller@courtesan.com>
  *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -16,6 +16,8 @@
 
 #include <config.h>
 
+#ifndef HAVE_NANOSLEEP
+
 #include <sys/types.h>
 #include <sys/time.h>
 #ifdef HAVE_SYS_SELECT_H
@@ -52,3 +54,4 @@ nanosleep(const struct timespec *ts, struct timespec *rts)
     }
     return rval;
 }
+#endif /* HAVE_NANOSLEEP */