Add include files to get prototype declarations, and fix bugs found.
[unix-history] / usr / src / lib / libc / compat-43 / setruid.c
index f520152..56ff1c8 100644 (file)
@@ -6,11 +6,18 @@
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
  */
 
 #if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)setruid.c  5.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)setruid.c  5.5 (Berkeley) %G%";
 #endif /* LIBC_SCCS and not lint */
 
 #endif /* LIBC_SCCS and not lint */
 
+#include <unistd.h>
+
+int
+#ifdef __STDC__
+setruid(uid_t ruid)
+#else
 setruid(ruid)
        int ruid;
 setruid(ruid)
        int ruid;
+#endif
 {
 
        return (setreuid(ruid, -1));
 {
 
        return (setreuid(ruid, -1));