sparc-linux-des-alignment-20070709
authorChaskiel M Grundman <cg2v@andrew.cmu.edu>
Mon, 9 Jul 2007 20:14:09 +0000 (20:14 +0000)
committerDerrick Brashear <shadow@dementia.org>
Mon, 9 Jul 2007 20:14:09 +0000 (20:14 +0000)
seems like compilers really hate des. it should would be nice to euthanize this.

it's a shame there's no simple license-friendly des library to use

src/des/des.h
src/des/pcbc_encrypt.c

index e75e90a..9ad21d4 100644 (file)
 typedef unsigned char des_cblock[8];   /* crypto-block size */
 /* Key schedule */
 typedef struct des_ks_struct {
+    union {
+    afs_uint32 i[2];
     des_cblock _;
+    } _;
 } des_key_schedule[16];
 
 #define DES_KEY_SZ     (sizeof(des_cblock))
index 12a22a8..19bcb87 100644 (file)
@@ -24,9 +24,9 @@
 #ifndef KERNEL
 #include <stdio.h>
 #endif
-#include <des.h>
 #include <afsconfig.h>
 #include <afs/param.h>
+#include <des.h>
 #include "des_prototypes.h"
 
 RCSID