diff --git a/libc/Makefile b/libc/Makefile
index 7b40e2ee..56e6205e 100644
--- a/libc/Makefile
+++ b/libc/Makefile
@@ -180,7 +180,6 @@ $(CPUDIR)/fork.o \
$(CPUDIR)/setjmp.o \
$(CPUDIR)/signal.o \
$(CPUDIR)/syscall.o \
-creat.o \
dirent/fddir-sortix.o \
dirent/scandir.o \
dispmsg_issue.o \
@@ -206,7 +205,10 @@ fchown.o \
fchrootat.o \
fchroot.o \
fcloseall.o \
-fcntl.o \
+fcntl/creat.o \
+fcntl/fcntl.o \
+fcntl/openat.o \
+fcntl/open.o \
fdio.o \
fgetpos.o \
fileno.o \
@@ -283,8 +285,6 @@ netdb/sethostent.o \
netdb/setnetent.o \
netdb/setprotoent.o \
netdb/setservent.o \
-openat.o \
-open.o \
pathconf.o \
pipe.o \
poll.o \
diff --git a/libc/creat.cpp b/libc/fcntl/creat.cpp
similarity index 98%
rename from libc/creat.cpp
rename to libc/fcntl/creat.cpp
index ea1e9743..3082ce03 100644
--- a/libc/creat.cpp
+++ b/libc/fcntl/creat.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- creat.cpp
+ fcntl/creat.cpp
Create a file.
*******************************************************************************/
diff --git a/libc/fcntl.cpp b/libc/fcntl/fcntl.cpp
similarity index 98%
rename from libc/fcntl.cpp
rename to libc/fcntl/fcntl.cpp
index 64cafc83..5ab3e384 100644
--- a/libc/fcntl.cpp
+++ b/libc/fcntl/fcntl.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- fcntl.cpp
+ fcntl/fcntl.cpp
Manipulates a file descriptor.
*******************************************************************************/
diff --git a/libc/open.cpp b/libc/fcntl/open.cpp
similarity index 98%
rename from libc/open.cpp
rename to libc/fcntl/open.cpp
index 51372040..0aeb7c8b 100644
--- a/libc/open.cpp
+++ b/libc/fcntl/open.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- open.cpp
+ fcntl/open.cpp
Open a file.
*******************************************************************************/
diff --git a/libc/openat.cpp b/libc/fcntl/openat.cpp
similarity index 98%
rename from libc/openat.cpp
rename to libc/fcntl/openat.cpp
index 6fefe688..06aab8bf 100644
--- a/libc/openat.cpp
+++ b/libc/fcntl/openat.cpp
@@ -17,7 +17,7 @@
You should have received a copy of the GNU Lesser General Public License
along with the Sortix C Library. If not, see .
- openat.cpp
+ fcntl/openat.cpp
Open a file relative to directory.
*******************************************************************************/