From 271ab10815cc150d07bdd5aaaaa6d44f4c5a65ba Mon Sep 17 00:00:00 2001
From: Joshua Saxby <joshua.a.saxby@gmail.com>
Date: Wed, 4 Dec 2019 16:23:52 +0000
Subject: [PATCH] Fix an issue caused by some omissions of filesize

---
 Makefile.build              | 1 +
 userprog/syscall_filesize.c | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Makefile.build b/Makefile.build
index d136a6f..39f59e1 100644
--- a/Makefile.build
+++ b/Makefile.build
@@ -72,6 +72,7 @@ userprog_SRC += userprog/syscall_remove.c
 userprog_SRC += userprog/syscall_write.c
 userprog_SRC += userprog/file_descriptors_map.c
 userprog_SRC += userprog/syscall_read.c
+userprog_SRC += userprog/syscall_filesize.c
 
 # No virtual memory code yet.
 #vm_SRC = vm/file.c			# Some file.
diff --git a/userprog/syscall_filesize.c b/userprog/syscall_filesize.c
index ae8e45a..aff7fe7 100644
--- a/userprog/syscall_filesize.c
+++ b/userprog/syscall_filesize.c
@@ -3,7 +3,7 @@
  *
  * Authored by Alex Stratford
  */
-
+#include <stddef.h>
 #include "system_calls.h"
 #include "filesys/file.h"
 
@@ -17,4 +17,4 @@ void syscall_filesize(struct intr_frame *f) {
 	// Using the file_length function in file.h to get the length and store it
 	int size = file_length(file); 
 	f->eax = size;
-}
\ No newline at end of file
+}
-- 
GitLab