aboutsummaryrefslogtreecommitdiff
path: root/lib/sys
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2022-12-15 22:46:25 +0100
committerNathan Reiner <nathan@nathanreiner.xyz>2022-12-15 22:46:25 +0100
commitb9038b1c6b31a8f8d6b8b648cee0cf3b457dc24c (patch)
treed967cf38fba25c1a3eed621026f37891bba8f191 /lib/sys
parent02062f0cf84e1cb7fb294de54b0c00db6323c529 (diff)
first version of io and wstdf
Diffstat (limited to 'lib/sys')
-rw-r--r--lib/sys/io.h4
-rw-r--r--lib/sys/syscalls.h1
-rw-r--r--lib/sys/write.h2
3 files changed, 3 insertions, 4 deletions
diff --git a/lib/sys/io.h b/lib/sys/io.h
index 3048ebe..8086869 100644
--- a/lib/sys/io.h
+++ b/lib/sys/io.h
@@ -1,5 +1,5 @@
-#ifndef IO_H
-#define IO_H
+#ifndef IO_SYS_H
+#define IO_SYS_H
#include "write.h"
#include "read.h"
diff --git a/lib/sys/syscalls.h b/lib/sys/syscalls.h
index 03ce997..50e8a4f 100644
--- a/lib/sys/syscalls.h
+++ b/lib/sys/syscalls.h
@@ -3,7 +3,6 @@
__asm__ (
"syscall:\n"
- "endbr64\n"
"mov %rdi, %rax\n"
"mov %rsi, %rdi\n"
"mov %rdx, %rsi\n"
diff --git a/lib/sys/write.h b/lib/sys/write.h
index 6ad748e..6447ed8 100644
--- a/lib/sys/write.h
+++ b/lib/sys/write.h
@@ -3,7 +3,7 @@
#include "syscalls.h"
-static int write(unsigned int fd, const char * buf, unsigned long count)
+static int write(unsigned int fd, const char *buf, unsigned long count)
{
return syscall(WRITE, fd, buf, count);
}