]> andersk Git - gssapi-openssh.git/blobdiff - openssh/openbsd-compat/bsd-misc.c
merged OPENSSH_4_2P1_GSSAPI_20051220 to GPT branch
[gssapi-openssh.git] / openssh / openbsd-compat / bsd-misc.c
index 070a133a2d20c8bcaf5f10bacaca25b1463b3813..56afa0975caeb06c97eadfac9c25104e4a2edd59 100644 (file)
@@ -122,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)
 {
@@ -223,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.036619 seconds and 4 git commands to generate.