]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
Fix compilation problem - write_oid not defined
authorKevin Coffman <kwc@citi.umich.edu>
Wed, 12 Jul 2006 03:09:59 +0000 (23:09 -0400)
committerNeil Brown <neilb@suse.de>
Fri, 21 Jul 2006 07:39:50 +0000 (17:39 +1000)
utils/gssd/write_bytes.h

index 8021cd823c9cc7a7340b5143ab3574fd69adae63..4fc72cc2648185847bba99d420f6d654c95bcd9a 100644 (file)
@@ -63,6 +63,19 @@ write_buffer(char **p, char *end, gss_buffer_desc *arg)
        return 0;
 }
 
+inline static int
+write_oid(char **p, char *end, gss_OID_desc *arg)
+{
+       int len = (int)arg->length;             /* make an int out of size_t */
+       if (WRITE_BYTES(p, end, len))
+               return -1;
+       if (*p + arg->length > end)
+               return -1;
+       memcpy(*p, arg->elements, len);
+       *p += len;
+       return 0;
+}
+
 static inline int
 get_bytes(char **ptr, const char *end, void *res, int len)
 {