]> andersk Git - openssh.git/blobdiff - openbsd-compat/bsd-misc.c
- (tim) [configure.ac] Bug 1078. Fix --without-kerberos5. Reported by
[openssh.git] / openbsd-compat / bsd-misc.c
index bc18b09c25643ac61bdb8078bf29edc94606d326..56afa0975caeb06c97eadfac9c25104e4a2edd59 100644 (file)
@@ -1,3 +1,4 @@
+
 /*
  * Copyright (c) 1999-2004 Damien Miller <djm@mindrot.org>
  *
 
 RCSID("$Id$");
 
+#ifndef HAVE___PROGNAME
+char *__progname;
+#endif
+
 /*
  * NB. duplicate __progname in case it is an alias for argv[0]
  * Otherwise it may get clobbered by setproctitle()
@@ -117,17 +122,6 @@ int truncate(const char *path, off_t length)
 }
 #endif /* HAVE_TRUNCATE */
 
-#if !defined(HAVE_SETGROUPS) && defined(SETGROUPS_NOOP)
-/*
- * Cygwin setgroups should be a noop.
- */
-int
-setgroups(size_t size, const gid_t *list)
-{
-       return (0);
-}
-#endif 
-
 #if !defined(HAVE_NANOSLEEP) && !defined(HAVE_NSLEEP)
 int nanosleep(const struct timespec *req, struct timespec *rem)
 {
@@ -218,3 +212,21 @@ mysignal(int sig, mysig_t act)
        return (signal(sig, act));
 #endif
 }
+
+#ifndef HAVE_STRDUP
+char *
+strdup(const char *str)
+{
+       size_t len;
+       char *cp;
+
+       len = strlen(str) + 1;
+       cp = malloc(len);
+       if (cp != NULL)
+               if (strlcpy(cp, str, len) != len) {
+                       free(cp);
+                       return NULL;
+               }
+       return cp;
+}
+#endif
This page took 0.052041 seconds and 4 git commands to generate.