diff --git a/log.c b/log.c
index 00a881f12c04e08e6ab374e6d1adfb0762a38b3a..f82a9d3c93d17782d162140aa187b4cf748b5546 100644
--- a/log.c
+++ b/log.c
@@ -38,14 +38,15 @@ struct logheader {
   int sector[LOGSIZE];
 };
 
-struct {
+struct log {
   struct spinlock lock;
   int start;
   int size;
   int intrans;
   int dev;
   struct logheader lh;
-} log;
+};
+struct log log;
 
 static void recover_from_log(void);