diff options
Diffstat (limited to 'userland/libc/sys')
-rw-r--r-- | userland/libc/sys/mman.h | 2 | ||||
-rw-r--r-- | userland/libc/sys/mman/mmap.c | 4 | ||||
-rw-r--r-- | userland/libc/sys/mman/munmap.c | 2 | ||||
-rw-r--r-- | userland/libc/sys/sendfile.c | 2 | ||||
-rw-r--r-- | userland/libc/sys/socket/listen.c | 6 | ||||
-rw-r--r-- | userland/libc/sys/socket/sendto.c | 2 | ||||
-rw-r--r-- | userland/libc/sys/time/gettimeofday.c | 6 | ||||
-rw-r--r-- | userland/libc/sys/types.h | 4 |
8 files changed, 15 insertions, 13 deletions
diff --git a/userland/libc/sys/mman.h b/userland/libc/sys/mman.h index e3ff734..a915291 100644 --- a/userland/libc/sys/mman.h +++ b/userland/libc/sys/mman.h @@ -1,7 +1,7 @@ #ifndef MMAP_H #define MMAP_H -#include <stdint.h> #include <stddef.h> +#include <stdint.h> void *mmap(void *addr, size_t length, int prot, int flags, int fd, size_t offset); diff --git a/userland/libc/sys/mman/mmap.c b/userland/libc/sys/mman/mmap.c index b9ad3a2..53c6f77 100644 --- a/userland/libc/sys/mman/mmap.c +++ b/userland/libc/sys/mman/mmap.c @@ -1,6 +1,6 @@ -#include <syscall.h> #include <errno.h> #include <sys/mman.h> +#include <syscall.h> extern int errno; @@ -14,6 +14,6 @@ void *mmap(void *addr, size_t length, int prot, int flags, int fd, .fd = fd, .offset = offset, }; -// return (void*)syscall(SYS_MMAP, &args, 0, 0, 0, 0); + // return (void*)syscall(SYS_MMAP, &args, 0, 0, 0, 0); RC_ERRNO(syscall(SYS_MMAP, &args, 0, 0, 0, 0)); } diff --git a/userland/libc/sys/mman/munmap.c b/userland/libc/sys/mman/munmap.c index 940ea46..5750cb4 100644 --- a/userland/libc/sys/mman/munmap.c +++ b/userland/libc/sys/mman/munmap.c @@ -2,5 +2,5 @@ #include <syscall.h> int munmap(void *addr, size_t length) { - RC_ERRNO(syscall(SYS_MUNMAP, addr, length,0, 0, 0)); + RC_ERRNO(syscall(SYS_MUNMAP, addr, length, 0, 0, 0)); } diff --git a/userland/libc/sys/sendfile.c b/userland/libc/sys/sendfile.c index 818883b..9de931b 100644 --- a/userland/libc/sys/sendfile.c +++ b/userland/libc/sys/sendfile.c @@ -1,6 +1,6 @@ +#include <errno.h> #include <sys/sendfile.h> #include <syscall.h> -#include <errno.h> u32 sendfile(int out_fd, int in_fd, off_t *offset, size_t count, int *error_rc) { diff --git a/userland/libc/sys/socket/listen.c b/userland/libc/sys/socket/listen.c index a3bec10..67cc6ce 100644 --- a/userland/libc/sys/socket/listen.c +++ b/userland/libc/sys/socket/listen.c @@ -1,9 +1,9 @@ -#include <sys/socket.h> #include <stdio.h> +#include <sys/socket.h> int listen(int socket, int backlog) { - (void)socket; - (void)backlog; + (void)socket; + (void)backlog; printf("TODO: Implement listen()\n"); return 0; } diff --git a/userland/libc/sys/socket/sendto.c b/userland/libc/sys/socket/sendto.c index 73437ab..be35ec0 100644 --- a/userland/libc/sys/socket/sendto.c +++ b/userland/libc/sys/socket/sendto.c @@ -7,7 +7,7 @@ struct two_args { }; size_t sendto(int socket, const void *message, size_t length, int flags, - const struct sockaddr *dest_addr, socklen_t dest_len) { + const struct sockaddr *dest_addr, socklen_t dest_len) { struct two_args extra = { .a = dest_addr, .b = dest_len, diff --git a/userland/libc/sys/time/gettimeofday.c b/userland/libc/sys/time/gettimeofday.c index e172cf2..3487254 100644 --- a/userland/libc/sys/time/gettimeofday.c +++ b/userland/libc/sys/time/gettimeofday.c @@ -1,5 +1,7 @@ #include <sys/time.h> #include <time.h> -static int return_tod =0; -int gettimeofday(struct timeval *tp, void *tzp) {return return_tod++;} +static int return_tod = 0; +int gettimeofday(struct timeval *tp, void *tzp) { + return return_tod++; +} diff --git a/userland/libc/sys/types.h b/userland/libc/sys/types.h index ffcf281..d9bede0 100644 --- a/userland/libc/sys/types.h +++ b/userland/libc/sys/types.h @@ -16,12 +16,12 @@ typedef int dev_t; typedef unsigned int fsblkcnt_t; typedef unsigned int fsfilcnt_t; typedef unsigned int ino_t; -//typedef unsigned int size_t; +// typedef unsigned int size_t; typedef int blksize_t; typedef int pid_t; typedef int ssize_t; -//typedef int clock_t; +// typedef int clock_t; typedef int time_t; #endif |