about summary refs log tree commit diff
path: root/nis/rpcsvc/yp_prot.h
diff options
context:
space:
mode:
Diffstat (limited to 'nis/rpcsvc/yp_prot.h')
-rw-r--r--nis/rpcsvc/yp_prot.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/nis/rpcsvc/yp_prot.h b/nis/rpcsvc/yp_prot.h
index bee84351bb..0c5a7101f7 100644
--- a/nis/rpcsvc/yp_prot.h
+++ b/nis/rpcsvc/yp_prot.h
@@ -154,8 +154,18 @@ struct ypresp_val {
 
 struct ypresp_key_val {
   ypstat status;
-  keydat keydat;
-  valdat valdat;
+#ifdef STUPID_SUN_BUG
+  /* This is the form as distributed by Sun.  But even the Sun NIS
+     servers expect the values in the other order.  So their
+     implementation somehow must change the order internally.  We
+     don't want to follow this bad example since the user should be
+     able to use rpcgen on this file.  */
+  keydat key;
+  valdat val;
+#else
+  valdat val;
+  keydat key;
+#endif
 };
 
 struct ypresp_master {